diff options
author | Todd C. Miller <millert@cvs.openbsd.org> | 1999-11-09 17:49:02 +0000 |
---|---|---|
committer | Todd C. Miller <millert@cvs.openbsd.org> | 1999-11-09 17:49:02 +0000 |
commit | da96ddce062a45f9808d8bc7ec08ca6ac4faf949 (patch) | |
tree | c63c26efd34a7c3b260d4a7850df4975f59b0345 /sys/net | |
parent | 346b591fe07eea5aca358cc33aca8127e138ba55 (diff) |
Add SIOCSIFMEDIA and SIOCGIFMEDIA to the switch in ifioctl(). SIOCSIFMEDIA
is only allowed if the user is the superuser. Aparently this got
missed when the ifmedia support was added in ages ago. More or less
based on how NetBSD does it (though it is rather obvious).
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index e9a22bddc07..96f9b3b345e 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.22 1999/10/27 16:36:25 deraadt Exp $ */ +/* $OpenBSD: if.c,v 1.23 1999/11/09 17:49:01 millert Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -621,8 +621,11 @@ ifioctl(so, cmd, data, p) case SIOCADDMULTI: case SIOCDELMULTI: + case SIOCSIFMEDIA: if ((error = suser(p->p_ucred, &p->p_acflag)) != 0) return (error); + /* FALLTHROUGH */ + case SIOCGIFMEDIA: if (ifp->if_ioctl == 0) return (EOPNOTSUPP); return ((*ifp->if_ioctl)(ifp, cmd, data)); |