summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_zyd.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2013-11-05 10:20:06 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2013-11-05 10:20:06 +0000
commit6d52c4dcd1c626834713dcf719c066097aa9f734 (patch)
tree1dc3c33c379891e075c305e970e0b1d9ddca9acd /sys/dev/usb/if_zyd.c
parent39c5fc7992b2198b383c3128140d2aa7a570cb4f (diff)
Instead of comparing the lower and higher addresses of all the multicast
entries to decide if the IFF_ALLMULTI flag should be set, check if there is at least one real range between them. This should not introduce any behavior change but will help changing our representation of multicast entries.
Diffstat (limited to 'sys/dev/usb/if_zyd.c')
-rw-r--r--sys/dev/usb/if_zyd.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index e5ac2d0603e..2c523867ef3 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.91 2013/08/07 01:06:43 bluhm Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.92 2013/11/05 10:20:05 mpi Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -1642,6 +1642,9 @@ zyd_set_multi(struct zyd_softc *sc)
uint32_t lo, hi;
uint8_t bit;
+ if (ac->ac_multirangecnt > 0)
+ ifp->if_flags |= IFF_ALLMULTI;
+
if ((ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) != 0) {
lo = hi = 0xffffffff;
goto done;
@@ -1649,11 +1652,6 @@ zyd_set_multi(struct zyd_softc *sc)
lo = hi = 0;
ETHER_FIRST_MULTI(step, ac, enm);
while (enm != NULL) {
- if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
- ifp->if_flags |= IFF_ALLMULTI;
- lo = hi = 0xffffffff;
- goto done;
- }
bit = enm->enm_addrlo[5] >> 2;
if (bit < 32)
lo |= 1 << bit;