From a7fe9d9c02a507a9b6e90adb6d5853fae91d1bb8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 5 May 2024 08:29:12 +0100 Subject: [PATCH] inet6: only mark autoconf addresses tentative if detached This really only affects userland (such as dhcpcd) handling autoconf as this failure path is pretty hard to get to with kernel side RA handling. Syncs with FreeBSD. --- sys/netinet6/nd6_rtr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netinet6/nd6_rtr.c b/sys/netinet6/nd6_rtr.c index 50f17a2ff8..a557eacb84 100644 --- a/sys/netinet6/nd6_rtr.c +++ b/sys/netinet6/nd6_rtr.c @@ -1313,9 +1313,12 @@ pfxlist_onlink_check(void) if (!(ifa->ia6_flags & IN6_IFF_AUTOCONF)) continue; - ifa->ia6_flags &= ~IN6_IFF_DETACHED; - ifa->ia6_flags |= IN6_IFF_TENTATIVE; - nd6_dad_start((struct ifaddr *)ifa, 0); + if (ifa->ia6_flags & IN6_IFF_DETACHED) { + ifa->ia6_flags &= ~IN6_IFF_DETACHED; + ifa->ia6_flags |= IN6_IFF_TENTATIVE; + /* Do we need a delay in this case? */ + nd6_dad_start((struct ifaddr *)ifa, 0); + } } } } -- 2.11.4.GIT