summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 854a879..1b64e91 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1646,11 +1646,13 @@ if_allmulti(ifp, onswitch)
{
int error = 0;
int s = splimp();
+ struct ifreq ifr;
if (onswitch) {
if (ifp->if_amcount++ == 0) {
ifp->if_flags |= IFF_ALLMULTI;
- error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, 0);
+ ifr.ifr_flags = ifp->if_flags;
+ error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
}
} else {
if (ifp->if_amcount > 1) {
@@ -1658,7 +1660,8 @@ if_allmulti(ifp, onswitch)
} else {
ifp->if_amcount = 0;
ifp->if_flags &= ~IFF_ALLMULTI;
- error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, 0);
+ ifr.ifr_flags = ifp->if_flags;
+ error = ifp->if_ioctl(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
}
}
splx(s);
@@ -1870,9 +1873,11 @@ if_setlladdr(struct ifnet *ifp, const u_char *lladdr, int len)
*/
if ((ifp->if_flags & IFF_UP) != 0) {
ifp->if_flags &= ~IFF_UP;
- (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, NULL);
+ ifr.ifr_flags = ifp->if_flags;
+ (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
ifp->if_flags |= IFF_UP;
- (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, NULL);
+ ifr.ifr_flags = ifp->if_flags;
+ (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr);
#ifdef INET
/*
* Also send gratuitous ARPs to notify other nodes about
OpenPOWER on IntegriCloud