From: Roy Marples Date: Fri, 30 Aug 2019 11:20:02 +0000 (+0100) Subject: Fix a crash for ipv4 only. X-Git-Tag: v8.0.4~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fc02542dfaaa580dce2fe3eaf8565d2d1551f70b;p=thirdparty%2Fdhcpcd.git Fix a crash for ipv4 only. --- diff --git a/src/ipv6.c b/src/ipv6.c index 9ee0039a..c296679b 100644 --- a/src/ipv6.c +++ b/src/ipv6.c @@ -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;