summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2013-06-13 21:06:58 +0000
committerbluhm <bluhm@openbsd.org>2013-06-13 21:06:58 +0000
commit411d3df2345e3f50dbb9d340004ba64e19656bac (patch)
tree3888b3b6294a9ee8eb06128d93a855fbed4708d8
parentRemove a remnant of the VIS optimized bcopy code that was hiding in a delay (diff)
downloadwireguard-openbsd-411d3df2345e3f50dbb9d340004ba64e19656bac.tar.xz
wireguard-openbsd-411d3df2345e3f50dbb9d340004ba64e19656bac.zip
As it is correct that the loopback address has no prefix, do not
complain about a missing prefix for ::1 in in6_unlink_ifa(). Also log the actual IPv6 address in the error message instead of the kernel pointer of the interface address. OK sthen@ mpi@
-rw-r--r--sys/netinet6/in6.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index f2e4b41730e..4928d9fbc03 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.112 2013/05/31 15:04:23 bluhm Exp $ */
+/* $OpenBSD: in6.c,v 1.113 2013/06/13 21:06:58 bluhm Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -1238,9 +1238,10 @@ in6_unlink_ifa(struct in6_ifaddr *ia, struct ifnet *ifp)
/* Release the reference to the base prefix. */
if (ia->ia6_ndpr == NULL) {
- if (!IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia)))
+ if (!IN6_IS_ADDR_LINKLOCAL(IA6_IN6(ia)) &&
+ !IN6_IS_ADDR_LOOPBACK(IA6_IN6(ia)))
log(LOG_NOTICE, "in6_unlink_ifa: interface address "
- "%p has no prefix\n", ia);
+ "%s has no prefix\n", ip6_sprintf(IA6_IN6(ia)));
} else {
ia->ia6_flags &= ~IN6_IFF_AUTOCONF;
if (--ia->ia6_ndpr->ndpr_refcnt == 0)