diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-02-14 20:09:21 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-02-14 20:09:21 +0000 |
commit | 91c2bf8e44f283fc3f8c9d12fd75f2235ddfd891 (patch) | |
tree | 1af76cae4bea516224fd8940b12a9076d5a4f063 /sys/dev/ic/pgt.c | |
parent | bae1a521a72bdc6a1980963770f8328eedfde5d7 (diff) |
Add SIOCADDMULTI and SIOCDELMULTI ioctl handlers. Without them IPv6 does
not work. Issue reported by brad@ OK mglocker@
Diffstat (limited to 'sys/dev/ic/pgt.c')
-rw-r--r-- | sys/dev/ic/pgt.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/sys/dev/ic/pgt.c b/sys/dev/ic/pgt.c index 80030ef9b6a..54e8689eb62 100644 --- a/sys/dev/ic/pgt.c +++ b/sys/dev/ic/pgt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pgt.c,v 1.40 2006/12/30 22:43:01 claudio Exp $ */ +/* $OpenBSD: pgt.c,v 1.41 2007/02/14 20:09:20 claudio Exp $ */ /* * Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org> @@ -2369,7 +2369,8 @@ pgt_ioctl(struct ifnet *ifp, u_long cmd, caddr_t req) free(pob, M_DEVBUF); break; } - case SIOCSIFADDR: ifa = (struct ifaddr *)req; + case SIOCSIFADDR: + ifa = (struct ifaddr *)req; ifp->if_flags |= IFF_UP; #ifdef INET if (ifa->ifa_addr->sa_family == AF_INET) @@ -2389,6 +2390,15 @@ pgt_ioctl(struct ifnet *ifp, u_long cmd, caddr_t req) } } break; + case SIOCADDMULTI: + case SIOCDELMULTI: + error = (cmd == SIOCADDMULTI) ? + ether_addmulti(ifr, &ic->ic_ac) : + ether_delmulti(ifr, &ic->ic_ac); + + if (error == ENETRESET) + error = 0; + break; case SIOCSIFMTU: if (ifr->ifr_mtu > PGT_FRAG_SIZE) { error = EINVAL; |