summaryrefslogtreecommitdiff
path: root/sys/arch/sgi
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2005-01-15 05:24:13 +0000
committerBrad Smith <brad@cvs.openbsd.org>2005-01-15 05:24:13 +0000
commit89df0e6b8b27747dc883f3de9e8f46b10fcedc39 (patch)
treea292b90e17b1cad700ae6fa40a061e782999a21f /sys/arch/sgi
parent8c0a544eeaf396cc953120df64521d1b451b7b18 (diff)
make sure interface is in RUNNING state before touching the multicast filters
From NetBSD NetBSD PR 27678 for details ok mcbride@
Diffstat (limited to 'sys/arch/sgi')
-rw-r--r--sys/arch/sgi/dev/if_mec.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/sgi/dev/if_mec.c b/sys/arch/sgi/dev/if_mec.c
index 51300e86d2e..06c8bb1f734 100644
--- a/sys/arch/sgi/dev/if_mec.c
+++ b/sys/arch/sgi/dev/if_mec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mec.c,v 1.6 2004/09/29 17:57:35 pefo Exp $ */
+/* $OpenBSD: if_mec.c,v 1.7 2005/01/15 05:24:10 brad Exp $ */
/* $NetBSD: if_mec_mace.c,v 1.5 2004/08/01 06:36:36 tsutsui Exp $ */
/*
@@ -1095,12 +1095,14 @@ mec_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
error = (cmd == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->sc_ac) :
ether_delmulti(ifr, &sc->sc_ac);
+
if (error == ENETRESET) {
/*
* Multicast list has changed; set the hardware
* filter accordingly.
*/
- mec_init(ifp);
+ if (ifp->if_flags & IFF_RUNNING)
+ mec_init(ifp);
error = 0;
}
break;