summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason <jason@openbsd.org>2001-03-14 20:11:39 +0000
committerjason <jason@openbsd.org>2001-03-14 20:11:39 +0000
commit9df2e68adcbbd267015e05b15f47c4a92cf2d26e (patch)
treea285cd0e6bf9092af1694ff77657cbeea35a5590
parentprovide a random start for tcp timestamps; niels@ ok (diff)
downloadwireguard-openbsd-9df2e68adcbbd267015e05b15f47c4a92cf2d26e.tar.xz
wireguard-openbsd-9df2e68adcbbd267015e05b15f47c4a92cf2d26e.zip
Follow openbsd model for multicast ioctl handling
-rw-r--r--sys/dev/pci/if_ti.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pci/if_ti.c b/sys/dev/pci/if_ti.c
index b97bfc3f05d..15b04c46fd0 100644
--- a/sys/dev/pci/if_ti.c
+++ b/sys/dev/pci/if_ti.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ti.c,v 1.15 2001/02/20 19:39:43 mickey Exp $ */
+/* $OpenBSD: if_ti.c,v 1.16 2001/03/14 20:11:39 jason Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -2404,8 +2404,13 @@ int ti_ioctl(ifp, command, data)
break;
case SIOCADDMULTI:
case SIOCDELMULTI:
- if (ifp->if_flags & IFF_RUNNING) {
- ti_setmulti(sc);
+ error = (command == SIOCADDMULTI) ?
+ ether_addmulti(ifr, &sc->arpcom) :
+ ether_delmulti(ifr, &sc->arpcom);
+
+ if (error == ENETRESET) {
+ if (ifp->if_flags & IFF_RUNNING)
+ ti_setmulti(sc);
error = 0;
}
break;