]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
inet6: For global addresses, only care about non duplicates.
authorRoy Marples <roy@marples.name>
Mon, 26 Aug 2019 01:41:38 +0000 (02:41 +0100)
committerRoy Marples <roy@marples.name>
Mon, 26 Aug 2019 01:41:38 +0000 (02:41 +0100)
Allow tentative and detaches to allow link down/up not to
trigger default route removal.

src/ipv6.c

index 8669f9c094ce70d2fbb66ed95af50f1b40661501..9ee0039aa8cf42618070f88dc46188679f7d408a 100644 (file)
@@ -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;