summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_carp.c
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2005-03-05 13:33:50 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2005-03-05 13:33:50 +0000
commitc3089f3c3cb3dc04d341646f077f85bb457e6f8b (patch)
treeb846ab1924f3c02f2c46bde21d98e8f5fa1d461e /sys/netinet/ip_carp.c
parent264ea074a54d6e03503b2c5b5be6ac552c265ede (diff)
Remove code which enforces a advskew=0 for the case
that carp shares the IP addresse with its physical interface. It's neither supported nor needed, since we have carpdev now. ok mcbride@
Diffstat (limited to 'sys/netinet/ip_carp.c')
-rw-r--r--sys/netinet/ip_carp.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 652ee26e1ed..d21e2c22aac 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.101 2005/03/01 19:04:56 mcbride Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.102 2005/03/05 13:33:49 mpf Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1565,7 +1565,7 @@ carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin)
{
struct ifnet *ifp = sc->sc_carpdev;
struct in_ifaddr *ia, *ia_if;
- int own, error = 0;
+ int error = 0;
if (sin->sin_addr.s_addr == 0) {
if (!(sc->sc_if.if_flags & IFF_UP))
@@ -1577,7 +1577,7 @@ carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin)
}
/* we have to do this by hand to ensure we don't match on ourselves */
- ia_if = NULL; own = 0;
+ ia_if = NULL;
for (ia = TAILQ_FIRST(&in_ifaddr); ia;
ia = TAILQ_NEXT(ia, ia_list)) {
@@ -1589,8 +1589,6 @@ carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin)
ia->ia_subnet) {
if (!ia_if)
ia_if = ia;
- if (sin->sin_addr.s_addr == ia->ia_addr.sin_addr.s_addr)
- own++;
}
}
@@ -1617,8 +1615,6 @@ carp_set_addr(struct carp_softc *sc, struct sockaddr_in *sin)
if (sc->sc_carpdev != NULL)
sc->sc_if.if_flags |= IFF_UP;
- if (own)
- sc->sc_advskew = 0;
carp_set_state(sc, INIT);
/*
@@ -1660,7 +1656,7 @@ carp_set_addr6(struct carp_softc *sc, struct sockaddr_in6 *sin6)
{
struct ifnet *ifp = sc->sc_carpdev;
struct in6_ifaddr *ia, *ia_if;
- int own, error = 0;
+ int error = 0;
if (IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
if (!(sc->sc_if.if_flags & IFF_UP))
@@ -1672,7 +1668,7 @@ carp_set_addr6(struct carp_softc *sc, struct sockaddr_in6 *sin6)
}
/* we have to do this by hand to ensure we don't match on ourselves */
- ia_if = NULL; own = 0;
+ ia_if = NULL;
for (ia = in6_ifaddr; ia; ia = ia->ia_next) {
int i;
@@ -1690,9 +1686,6 @@ carp_set_addr6(struct carp_softc *sc, struct sockaddr_in6 *sin6)
(i == 4)) {
if (!ia_if)
ia_if = ia;
- if (IN6_ARE_ADDR_EQUAL(&sin6->sin6_addr,
- &ia->ia_addr.sin6_addr))
- own++;
}
}