From 6c37207c2487519261a17ce1069fe96cace90de8 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Mon, 26 Aug 2019 02:41:38 +0100 Subject: [PATCH] inet6: For global addresses, only care about non duplicates. Allow tentative and detaches to allow link down/up not to trigger default route removal. --- src/ipv6.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ipv6.c b/src/ipv6.c index 8669f9c0..9ee0039a 100644 --- a/src/ipv6.c +++ b/src/ipv6.c @@ -1076,7 +1076,10 @@ ipv6_ifanyglobal(struct interface *ifp) TAILQ_FOREACH(ia, &state->addrs, next) { if (IN6_IS_ADDR_LINKLOCAL(&ia->addr)) continue; - if (!(ia->addr_flags & IN6_IFF_NOTUSEABLE)) + /* Let's be optimistic. + * Any decent OS won't forward or accept traffic + * from/to tentative or detached addresses. */ + if (!(ia->addr_flags & IN6_IFF_DUPLICATED)) break; } return ia; -- 2.47.2