From 571c6339331fb200c0d1ba5640644587fead027c Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Thu, 13 Jun 2013 21:06:59 +0000 Subject: 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@ --- sys/netinet6/in6.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/netinet6/in6.c') 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) -- cgit v1.2.3