summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_dc.c
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2000-02-15 02:28:16 +0000
committerJason Wright <jason@cvs.openbsd.org>2000-02-15 02:28:16 +0000
commit53fdedfb0b6a3815faa513c0a77ceb9e74e2d0b5 (patch)
tree4d661de226e0e80103d3051b1eff275336289c5f /sys/dev/pci/if_dc.c
parenta1ad75dfed29dd509de96d7ef5b4bb3783afaa88 (diff)
make sure to call ether_{add,del}multi() as appropriate in xxx_ioctl()
Diffstat (limited to 'sys/dev/pci/if_dc.c')
-rw-r--r--sys/dev/pci/if_dc.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/pci/if_dc.c b/sys/dev/pci/if_dc.c
index 08aba98d684..9b11f32df79 100644
--- a/sys/dev/pci/if_dc.c
+++ b/sys/dev/pci/if_dc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_dc.c,v 1.9 2000/01/16 16:17:56 jason Exp $ */
+/* $OpenBSD: if_dc.c,v 1.10 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2610,8 +2610,18 @@ int dc_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- dc_setfilt(sc);
- error = 0;
+ 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.
+ */
+ dc_setfilt(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA: