summaryrefslogtreecommitdiffstats
path: root/sys/net
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1998-08-12 22:51:59 +0000
committerwpaul <wpaul@FreeBSD.org>1998-08-12 22:51:59 +0000
commit08847958af4118df8daa33deb0e6fc65d41bebbc (patch)
tree5ff1d8b71d8039dc1e9a931fbe98b9ce293166e8 /sys/net
parent64b624ba3ecda9abea7854a191d37ee2dd64b270 (diff)
downloadFreeBSD-src-08847958af4118df8daa33deb0e6fc65d41bebbc.zip
FreeBSD-src-08847958af4118df8daa33deb0e6fc65d41bebbc.tar.gz
One-liner: add a call to the underlying device driver's SIOCDELMULTI
ioctl() routine at the end of if_delmulti() so that interfaces with hardware multicast filtering can update their filters in a timely manner. If the interface doesn't support hardware multicast filtering, then reception of multicast frames is done using 'promiscious mode' or 'capture all multicast frames' mode and software filtering in the kernel. In this case, it doesn't matter if if_delmulti() ever does an SCIODELMULTI on the interface or not: if MULTICAST support is enabled, then we join the 'all hosts' group when the interface is configured, and remain in it until the interface is brought down. Without hardware filtering, joining one group means joining all groups, so it makes no difference if we call the SIOCDELMULTI routine. If the interface does support hardware multicast filtering, then by not reprogramming the hardware filter in if_delmulti(), we have to wait until somebody calls if_setmulti(), during which time the interface is receiving frames for multicast groups in which we are no longer interested.
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 56b9ae8..295ae4d 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
- * $Id: if.c,v 1.60 1998/06/08 20:33:29 julian Exp $
+ * $Id: if.c,v 1.61 1998/07/20 13:21:56 dfr Exp $
*/
#include "opt_compat.h"
@@ -1031,6 +1031,7 @@ if_delmulti(ifp, sa)
s = splimp();
LIST_REMOVE(ifma, ifma_link);
+ ifp->if_ioctl(ifp, SIOCDELMULTI, 0);
splx(s);
free(ifma->ifma_addr, M_IFMADDR);
free(sa, M_IFMADDR);
OpenPOWER on IntegriCloud