diff options
author | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2006-08-28 17:29:54 +0000 |
---|---|---|
committer | Ryan Thomas McBride <mcbride@cvs.openbsd.org> | 2006-08-28 17:29:54 +0000 |
commit | 2ab81832b20fd389cafab35fe8cec780751dfd33 (patch) | |
tree | f6d00524d9250c0bb48980ee7a3aabf4a7f1ff70 /sys/netinet | |
parent | 36c14969ad2c478d40023a6324c1dc6befce513a (diff) |
Make carp see all IPv6 address additions and remove dead code in carp_ioctl()
ok mpf@ henning@
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_carp.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 54ce44045a4..8a69b658aac 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_carp.c,v 1.128 2006/08/16 09:40:52 mpf Exp $ */ +/* $OpenBSD: ip_carp.c,v 1.129 2006/08/28 17:29:53 mcbride Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff. All rights reserved. @@ -1870,16 +1870,11 @@ carp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) struct proc *p = curproc; /* XXX */ struct carp_softc *sc = ifp->if_softc, *vr; struct carpreq carpr; - struct ifaddr *ifa; - struct ifreq *ifr; - struct ifaliasreq *ifra; + struct ifaddr *ifa = (struct ifaddr *)addr; + struct ifreq *ifr = (struct ifreq *)addr; struct ifnet *cdev = NULL; int error = 0; - ifa = (struct ifaddr *)addr; - ifra = (struct ifaliasreq *)addr; - ifr = (struct ifreq *)addr; - switch (cmd) { case SIOCSIFADDR: switch (ifa->ifa_addr->sa_family) { @@ -1903,28 +1898,6 @@ carp_ioctl(struct ifnet *ifp, u_long cmd, caddr_t addr) } break; - case SIOCAIFADDR: - switch (ifa->ifa_addr->sa_family) { -#ifdef INET - case AF_INET: - sc->sc_if.if_flags |= IFF_UP; - bcopy(ifa->ifa_addr, ifa->ifa_dstaddr, - sizeof(struct sockaddr)); - error = carp_set_addr(sc, satosin(&ifra->ifra_addr)); - break; -#endif /* INET */ -#ifdef INET6 - case AF_INET6: - sc->sc_if.if_flags |= IFF_UP; - error = carp_set_addr6(sc, satosin6(&ifra->ifra_addr)); - break; -#endif /* INET6 */ - default: - error = EAFNOSUPPORT; - break; - } - break; - case SIOCSIFFLAGS: if (sc->sc_state != INIT && !(ifr->ifr_flags & IFF_UP)) { timeout_del(&sc->sc_ad_tmo); |