summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMarco Pfatschbacher <mpf@cvs.openbsd.org>2007-03-27 21:58:17 +0000
committerMarco Pfatschbacher <mpf@cvs.openbsd.org>2007-03-27 21:58:17 +0000
commit912e038f8bd8b96aad8907e20bb88e091bc7f0a1 (patch)
treef371957e24e475c066f47264786a4aa49d9398ef /sys
parent8a44dfc0ce60a2b01baba9ee23f9da7955234ffa (diff)
Don't pick up IPv6 link local IPs on address deletions.
This unbreaks carp reconfiguration. OK henning@, mcbride@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_carp.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 5bb13a82b16..76fa73acce9 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.134 2007/03/25 18:26:23 mpf Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.135 2007/03/27 21:58:16 mpf Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1830,8 +1830,9 @@ carp_addr_updated(void *v)
TAILQ_FOREACH(ifa, &sc->sc_if.if_addrlist, ifa_list) {
if (ifa->ifa_addr->sa_family == AF_INET)
new_naddrs++;
- else if (ifa->ifa_addr->sa_family == AF_INET6)
- new_naddrs6++;
+ else if (ifa->ifa_addr->sa_family == AF_INET6 &&
+ !IN6_IS_ADDR_LINKLOCAL(&ifatoia6(ifa)->ia_addr.sin6_addr))
+ new_naddrs6++;
}
/* Handle a callback after SIOCDIFADDR */