summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2013-08-12 06:24:29 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2013-08-12 06:24:29 +0000
commit2ce7bd2b4d6c711bfa8d728500743ae05be15b8b (patch)
tree1378c3c49f0ee6725b9f4fff9da13badb78d5493 /sys
parent6fd950a24442da960ba094d3c6f39c06a02e360f (diff)
In the common IPv4 and IPv6 file ip_carp.c an #ifdef INET6 was
missing. Especially the IN6_IS_ADDR_LINKLOCAL() macro should not be necessary in IPv4 only code. No binary change. OK henning@ claudio@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_carp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
index 156e4f7c71a..af5eb7762f4 100644
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_carp.c,v 1.209 2013/06/20 12:03:40 mpi Exp $ */
+/* $OpenBSD: ip_carp.c,v 1.210 2013/08/12 06:24:28 bluhm Exp $ */
/*
* Copyright (c) 2002 Michael Shalayeff. All rights reserved.
@@ -1969,9 +1969,11 @@ 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++;
+#ifdef INET6
else if (ifa->ifa_addr->sa_family == AF_INET6 &&
!IN6_IS_ADDR_LINKLOCAL(&ifatoia6(ifa)->ia_addr.sin6_addr))
new_naddrs6++;
+#endif /* INET6 */
}
/* We received address changes from if_addrhooks callback */