From 311f8182d8d121e5746c102c8a42ee5fed9ba559 Mon Sep 17 00:00:00 2001 From: mpi Date: Mon, 8 Aug 2016 13:09:36 +0000 Subject: [PATCH] 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. --- sys/netinet6/in6.c | 6 ++++-- 1 file 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) -- 2.20.1