diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-01-04 02:32:19 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-01-04 02:32:19 +0000 |
commit | 6aa828eec10dfc8e0ad231b12cf7bfc3363d5dd6 (patch) | |
tree | b566ea79f6de3ff7e726954c9a03d13a20452dcf /sys/dev | |
parent | cf709d84469ff2887d6420fcbda81e062f173e2e (diff) |
though this is untested this couldn't be any worse than before.
fix completely broken multicast ioctl switch case.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_bce.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/dev/pci/if_bce.c b/sys/dev/pci/if_bce.c index 94156e4cb67..37dba592966 100644 --- a/sys/dev/pci/if_bce.c +++ b/sys/dev/pci/if_bce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bce.c,v 1.4 2004/12/02 02:20:41 brad Exp $ */ +/* $OpenBSD: if_bce.c,v 1.5 2005/01/04 02:32:18 brad Exp $ */ /* $NetBSD: if_bce.c,v 1.3 2003/09/29 01:53:02 mrg Exp $ */ /* @@ -509,8 +509,19 @@ bce_ioctl(ifp, cmd, data) break; case SIOCADDMULTI: case SIOCDELMULTI: - if (ifp->if_flags & IFF_RUNNING) - bce_set_filter(ifp); + error = (cmd == SIOCADDMULTI) ? + ether_addmulti(ifr, &sc->bce_ac) : + ether_delmulti(ifr, &sc->bce_ac); + + if (error == ENETRESET) { + /* + * Multicast list has changed; set the hardware + * filter accordingly. + */ + if (ifp->if_flags & IFF_RUNNING) + bce_set_filter(ifp); + error = 0; + } break; case SIOCSIFMEDIA: case SIOCGIFMEDIA: |