From: Roy Marples Date: Thu, 18 Sep 2014 13:38:46 +0000 (+0000) Subject: Check we have allocated IPv6 resources before checkings RA's. X-Git-Tag: v6.4.5~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe6c1b9d5810794d96470b1b93fb86684c24d570;p=thirdparty%2Fdhcpcd.git Check we have allocated IPv6 resources before checkings RA's. Fixes [1e770ea479]. --- diff --git a/ipv6nd.c b/ipv6nd.c index 1dcb24a6..794ef9dc 100644 --- a/ipv6nd.c +++ b/ipv6nd.c @@ -397,6 +397,9 @@ ipv6nd_addrexists(struct dhcpcd_ctx *ctx, const struct ipv6_addr *addr) struct ra *rap; struct ipv6_addr *ap; + if (ctx->ipv6 == NULL) + return 0; + TAILQ_FOREACH(rap, ctx->ipv6->ra_routers, next) { TAILQ_FOREACH(ap, &rap->addrs, next) { if (addr == NULL) {