summaryrefslogtreecommitdiffstats
path: root/sys/dev/usb/if_kue.c
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2005-01-03 22:45:52 +0000
committerbrad <brad@openbsd.org>2005-01-03 22:45:52 +0000
commit2211234856e751e25bddaf199350f990d153c54b (patch)
tree8f678e00acaadef138217ad5f0e8202e141dbb08 /sys/dev/usb/if_kue.c
parenttoo much Xo/Xc in this file; (diff)
downloadwireguard-openbsd-2211234856e751e25bddaf199350f990d153c54b.tar.xz
wireguard-openbsd-2211234856e751e25bddaf199350f990d153c54b.zip
- make sure int is in running state before touching the multicast filters
- call foo_setmulti only instead of init'ing the chip - don't overwrite potential error return with success when calling ether_addmulti/ether_delmulti ok dlg@
Diffstat (limited to 'sys/dev/usb/if_kue.c')
-rw-r--r--sys/dev/usb/if_kue.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 3f2a126b5b8..1dabf799918 100644
--- a/sys/dev/usb/if_kue.c
+++ b/sys/dev/usb/if_kue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_kue.c,v 1.33 2004/12/12 06:21:35 deraadt Exp $ */
+/* $OpenBSD: if_kue.c,v 1.34 2005/01/03 22:45:52 brad Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -1177,12 +1177,14 @@ kue_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
error = (command == SIOCADDMULTI) ?
ether_addmulti(ifr, &sc->arpcom) :
ether_delmulti(ifr, &sc->arpcom);
+
if (error == ENETRESET) {
/*
* Multicast list has changed; set the hardware
* filter accordingly.
*/
- kue_setmulti(sc);
+ if (ifp->if_flags & IFF_RUNNING)
+ kue_setmulti(sc);
error = 0;
}
break;