From d183af7f3fc74a4eb9e5a4a794d5bf80b2048f83 Mon Sep 17 00:00:00 2001 From: Ruslan Ermilov Date: Wed, 1 Feb 2006 10:11:24 +0000 Subject: [PATCH] Setting IFF_ALLMULTI on a running interface didn't call bge_setmulti() as intended, resulting in a non-working multicast routing. Fix it. MFC after: 3 days --- sys/dev/bge/if_bge.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index b56e099df979..22a4c6c70894 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -3439,7 +3439,7 @@ bge_ioctl(ifp, command, data) * instead of reinitializing the entire NIC. Doing * a full re-init means reloading the firmware and * waiting for it to start up, which may take a - * second or two. + * second or two. Similarly for ALLMULTI. */ if (ifp->if_drv_flags & IFF_DRV_RUNNING && ifp->if_flags & IFF_PROMISC && @@ -3451,6 +3451,9 @@ bge_ioctl(ifp, command, data) sc->bge_if_flags & IFF_PROMISC) { BGE_CLRBIT(sc, BGE_RX_MODE, BGE_RXMODE_RX_PROMISC); + } else if (ifp->if_drv_flags & IFF_DRV_RUNNING && + (ifp->if_flags ^ sc->bge_if_flags) & IFF_ALLMULTI) { + bge_setmulti(sc); } else bge_init_locked(sc); } else {