]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Better fix for prior.
authorRoy Marples <roy@marples.name>
Fri, 30 Aug 2019 11:50:00 +0000 (12:50 +0100)
committerRoy Marples <roy@marples.name>
Fri, 30 Aug 2019 11:50:00 +0000 (12:50 +0100)
src/ipv6.c

index c296679b89a3a51d5b5f9808d56aea398834939f..419a3db304ebd83cb96c4f470280889d689ba51e 100644 (file)
@@ -1231,7 +1231,8 @@ out:
         * or DHCP6 handlers and the existance of any useable
         * global address on the interface has changed,
         * call rt_build to add/remove the default route. */
-       if (!(ctx->options & DHCPCD_RTBUILD) &&
+       if (ifp->active && ifp->options->options & DHCPCD_IPV6 &&
+           !(ctx->options & DHCPCD_RTBUILD) &&
            (ipv6_ifanyglobal(ifp) != NULL) != anyglobal)
                rt_build(ctx, AF_INET6);
 }
@@ -2295,9 +2296,6 @@ inet6_raroutes(rb_tree_t *routes, struct dhcpcd_ctx *ctx)
        struct ra *rap;
        const struct ipv6_addr *addr;
 
-       if (ctx->ra_routers == NULL)
-               return 0;
-
        TAILQ_FOREACH(rap, ctx->ra_routers, next) {
                if (rap->expired)
                        continue;