diff options
author | wollman <wollman@FreeBSD.org> | 1997-02-14 15:30:54 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1997-02-14 15:30:54 +0000 |
commit | 936314fb4096f9ce1eb390ac682800ecdb6cdc5a (patch) | |
tree | 16c1f5aed5452a28ecd8f82539968f12e88e80b2 /sys | |
parent | 98939b4915b5686bf26c35388ff4a3cd41f9eb57 (diff) | |
download | FreeBSD-src-936314fb4096f9ce1eb390ac682800ecdb6cdc5a.zip FreeBSD-src-936314fb4096f9ce1eb390ac682800ecdb6cdc5a.tar.gz |
Send RTM_IFINFO messages whenever promiscuous and all-multicast
modes are enabled or disabled.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index 982fc00..1bcb1d8 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if.c 8.3 (Berkeley) 1/4/94 - * $FreeBSD$ + * $Id$ */ #include <sys/param.h> @@ -669,6 +669,7 @@ ifpromisc(ifp, pswitch) int pswitch; { struct ifreq ifr; + int error; if (pswitch) { /* @@ -688,7 +689,10 @@ ifpromisc(ifp, pswitch) ifp->if_flags &= ~IFF_PROMISC; } ifr.ifr_flags = ifp->if_flags; - return ((*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr)); + error = (*ifp->if_ioctl)(ifp, SIOCSIFFLAGS, (caddr_t)&ifr); + if (error == 0) + rt_ifmsg(ifp); + return error; } /* @@ -795,6 +799,9 @@ if_allmulti(ifp, onswitch) } } splx(s); + + if (error == 0) + rt_ifmsg(ifp); return error; } |