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.
This commit is contained in:
parent
f01beb610a
commit
c7323482f4
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user