diff options
author | Damien Bergamini <damien@cvs.openbsd.org> | 2008-12-03 17:24:46 +0000 |
---|---|---|
committer | Damien Bergamini <damien@cvs.openbsd.org> | 2008-12-03 17:24:46 +0000 |
commit | 165ea12fb4655c07cab968d4c3305120be086bde (patch) | |
tree | 340906e24f6561158a7c79e743acef698d337367 /sys/net80211/ieee80211_ioctl.c | |
parent | d06deba6cfe613db1f4b254995a03db940dd9cf2 (diff) |
small fix for IEEE80211_STA_ONLY: do not let users set HostAP specific
flags using "nwflag".
Diffstat (limited to 'sys/net80211/ieee80211_ioctl.c')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 41058d22084..c8a5f9d5ac9 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.c,v 1.26 2008/10/02 20:21:15 brad Exp $ */ +/* $OpenBSD: ieee80211_ioctl.c,v 1.27 2008/12/03 17:24:45 damien Exp $ */ /* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */ /*- @@ -726,13 +726,14 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) if ((error = suser(curproc, 0)) != 0) break; flags = (u_int32_t)ifr->ifr_flags << IEEE80211_F_USERSHIFT; + if ( #ifndef IEEE80211_STA_ONLY - if (ic->ic_opmode != IEEE80211_M_HOSTAP && + ic->ic_opmode != IEEE80211_M_HOSTAP && +#endif (flags & IEEE80211_F_HOSTAPMASK)) { error = EINVAL; break; } -#endif ic->ic_flags = (ic->ic_flags & ~IEEE80211_F_USERMASK) | flags; error = ENETRESET; break; |