From: Roy Marples Date: Sun, 9 Feb 2020 18:54:29 +0000 (+0000) Subject: inet6: guard getting RA routers if inet6 not initialised X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d1888651139a4a8a115ba2c7859d1aaa38fcaa76;p=thirdparty%2Fdhcpcd.git inet6: guard getting RA routers if inet6 not initialised Now that we get inet6 routes even when only building inet routes we need to guard as the RA routers collection could be NULL. --- diff --git a/src/ipv6.c b/src/ipv6.c index 18f32c6c..0ac9f095 100644 --- a/src/ipv6.c +++ b/src/ipv6.c @@ -2323,6 +2323,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;