diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-10-26 15:00:29 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2017-10-26 15:00:29 +0000 |
commit | 7d8adc66b5e5226092377e2b475f9ef528ff9464 (patch) | |
tree | 1928ebb4566f6659acfec473d51070e6d2984df3 /sys/net80211 | |
parent | 8896e57cceaa27ebf468942ffc8dde08e9fb0da2 (diff) |
Move common code to add/remove multicast filters to ieee80211_ioctl(9).
ok jsg@, stsp@
Diffstat (limited to 'sys/net80211')
-rw-r--r-- | sys/net80211/ieee80211_ioctl.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/net80211/ieee80211_ioctl.c b/sys/net80211/ieee80211_ioctl.c index 279f6c54e03..8b967571e28 100644 --- a/sys/net80211/ieee80211_ioctl.c +++ b/sys/net80211/ieee80211_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ieee80211_ioctl.c,v 1.53 2017/07/19 22:04:46 stsp Exp $ */ +/* $OpenBSD: ieee80211_ioctl.c,v 1.54 2017/10/26 15:00:28 mpi Exp $ */ /* $NetBSD: ieee80211_ioctl.c,v 1.15 2004/05/06 02:58:16 dyoung Exp $ */ /*- @@ -841,6 +841,14 @@ ieee80211_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) ic->ic_flags = (ic->ic_flags & ~IEEE80211_F_USERMASK) | flags; error = ENETRESET; break; + case SIOCADDMULTI: + case SIOCDELMULTI: + error = (cmd == SIOCADDMULTI) ? + ether_addmulti(ifr, &ic->ic_ac) : + ether_delmulti(ifr, &ic->ic_ac); + if (error == ENETRESET) + error = 0; + break; default: error = ether_ioctl(ifp, &ic->ic_ac, cmd, data); } |