From 538a88fe6e164aecb778ec3cddcc819f3d7e8cd7 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Sun, 16 Jun 2013 21:27:16 +0000 Subject: If the prefixlen is 128, SIOCAIFADDR_IN6 does not add a prefix. In this case, in6_unlink_ifa() must not complain about a missing prefix. To avoid a false log message, check the prefixmask when the interface address gets deleted. OK mpi@ --- sys/netinet6/in6.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/netinet6') diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 4928d9fbc03..0f4856a2a17 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in6.c,v 1.113 2013/06/13 21:06:58 bluhm Exp $ */ +/* $OpenBSD: in6.c,v 1.114 2013/06/16 21:27:15 bluhm Exp $ */ /* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */ /* @@ -1239,7 +1239,8 @@ 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)) && - !IN6_IS_ADDR_LOOPBACK(IA6_IN6(ia))) + !IN6_IS_ADDR_LOOPBACK(IA6_IN6(ia)) && + !IN6_ARE_ADDR_EQUAL(IA6_MASKIN6(ia), &in6mask128)) log(LOG_NOTICE, "in6_unlink_ifa: interface address " "%s has no prefix\n", ip6_sprintf(IA6_IN6(ia))); } else { -- cgit v1.2.3