summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2013-06-16 21:27:15 +0000
committerbluhm <bluhm@openbsd.org>2013-06-16 21:27:15 +0000
commit57351dcaed71a7e79a7968d252b673114d61c326 (patch)
tree8cf43dc77a13b58ece1a5b57cc4257c8236fb6e8 /sys
parentRemove variable sa_family_t family in gif_start() and gif_output(). (diff)
downloadwireguard-openbsd-57351dcaed71a7e79a7968d252b673114d61c326.tar.xz
wireguard-openbsd-57351dcaed71a7e79a7968d252b673114d61c326.zip
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@
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet6/in6.c5
1 files changed, 3 insertions, 2 deletions
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 {