summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2016-08-08 13:09:37 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2016-08-08 13:09:37 +0000
commit138094adfc427eab4ed40210670248b4b6e8240c (patch)
tree0d5d0d5ae1d44ff7d85911b9f10b8e617b918e91
parent8e941cf9359813b1eef61497decf4d5f632307d2 (diff)
Execute address hooks in the update case.
This matches what IPv4 is doing and unbreak carp(4) when the same address is set twice, for example when running netstart(8) multiple times. Issue reported by and fix from Simon Mages.
-rw-r--r--sys/netinet6/in6.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c
index bd0b3155629..219c6c9491b 100644
--- a/sys/netinet6/in6.c
+++ b/sys/netinet6/in6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in6.c,v 1.189 2016/07/13 08:40:46 mpi Exp $ */
+/* $OpenBSD: in6.c,v 1.190 2016/08/08 13:09:36 mpi Exp $ */
/* $KAME: in6.c,v 1.372 2004/06/14 08:14:21 itojun Exp $ */
/*
@@ -438,8 +438,10 @@ in6_ioctl(u_long cmd, caddr_t data, struct ifnet *ifp, int privileged)
break;
}
- if (!newifaddr)
+ if (!newifaddr) {
+ dohooks(ifp->if_addrhooks, 0);
break;
+ }
/* Perform DAD, if needed. */
if (ia6->ia6_flags & IN6_IFF_TENTATIVE)