]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
IPv6ND: Don't warn about no global addresses for default route
authorRoy Marples <roy@marples.name>
Wed, 4 Sep 2024 10:48:46 +0000 (11:48 +0100)
committerRoy Marples <roy@marples.name>
Wed, 4 Sep 2024 10:48:46 +0000 (11:48 +0100)
If we are not installing a default route.

src/ipv6nd.c

index 11f5dc5f49966eee4c6030a723aa0eef5edd9526..3d3f1fbda9b5323e1638e095775621ebf7405522 100644 (file)
@@ -1598,7 +1598,8 @@ ipv6nd_handlera(struct dhcpcd_ctx *ctx,
                logwarnx("%s: %s: no longer a default router (lifetime = 0)",
                    ifp->name, rap->sfrom);
 
-       if (new_data && !has_address && rap->lifetime && !ipv6_anyglobal(ifp))
+       if (new_data && !has_address && rap->lifetime &&
+           ifp->options->options & DHCPCD_GATEWAY && !ipv6_anyglobal(ifp))
                logwarnx("%s: no global addresses for default route",
                    ifp->name);