]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a crash for ipv4 only.
authorRoy Marples <roy@marples.name>
Fri, 30 Aug 2019 11:20:02 +0000 (12:20 +0100)
committerRoy Marples <roy@marples.name>
Fri, 30 Aug 2019 11:20:02 +0000 (12:20 +0100)
src/ipv6.c

index 9ee0039aa8cf42618070f88dc46188679f7d408a..c296679b89a3a51d5b5f9808d56aea398834939f 100644 (file)
@@ -2295,6 +2295,9 @@ 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;