summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-06-05 20:25:16 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-06-05 20:25:16 +0000
commit177916f852983a49bc7fa47faa48deb375d988ad (patch)
tree92605c38ccb156f195db88d3bcd07a03ebdaa24d /sys/dev
parentf7c26570915d87117cdfa533ccef7fd3a2ed9e2e (diff)
Make multicast ranges work.
ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ic/mtd8xx.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/ic/mtd8xx.c b/sys/dev/ic/mtd8xx.c
index 2207abae4a1..a3d5c9cba6e 100644
--- a/sys/dev/ic/mtd8xx.c
+++ b/sys/dev/ic/mtd8xx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mtd8xx.c,v 1.4 2004/05/26 19:56:31 brad Exp $ */
+/* $OpenBSD: mtd8xx.c,v 1.5 2004/06/05 20:25:15 mcbride Exp $ */
/*
* Copyright (c) 2003 Oleg Safiullin <form@pdp11.org.ru>
@@ -323,6 +323,7 @@ mtd_setmulti(struct mtd_softc *sc)
struct ether_multi *enm;
int mcnt = 0;
+allmulti:
rxfilt = CSR_READ_4(MTD_TCRRCR) & ~RCR_AM;
if (ifp->if_flags & (IFF_ALLMULTI | IFF_PROMISC)) {
rxfilt |= RCR_AM;
@@ -339,6 +340,10 @@ mtd_setmulti(struct mtd_softc *sc)
/* Now program new ones. */
ETHER_FIRST_MULTI(step, &sc->sc_arpcom, enm);
while (enm != NULL) {
+ if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
+ ifp->if_flags |= IFF_ALLMULTI;
+ goto allmulti;
+ }
crc = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN) >> 26;
hash[crc >> 5] |= 1 << (crc & 0xf);
++mcnt;