summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_rl.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_rl.c
parenta1ad75dfed29dd509de96d7ef5b4bb3783afaa88 (diff)
make sure to call ether_{add,del}multi() as appropriate in xxx_ioctl()
Diffstat (limited to 'sys/dev/pci/if_rl.c')
-rw-r--r--sys/dev/pci/if_rl.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/pci/if_rl.c b/sys/dev/pci/if_rl.c
index 95362dad69b..2735b95f907 100644
--- a/sys/dev/pci/if_rl.c
+++ b/sys/dev/pci/if_rl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rl.c,v 1.19 1999/12/14 22:34:45 jason Exp $ */
+/* $OpenBSD: if_rl.c,v 1.20 2000/02/15 02:28:14 jason Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -1129,8 +1129,18 @@ int rl_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- rl_setmulti(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.
+ */
+ rl_setmulti(sc);
+ error = 0;
+ }
break;
case SIOCGIFMEDIA:
case SIOCSIFMEDIA: