From: Roy Marples Date: Thu, 29 May 2014 06:43:54 +0000 (+0000) Subject: Only process IPv6 neighbour messages from the link socket if we have inited X-Git-Tag: v6.4.0~41 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=362153f5b4dde84c1a56320db935becf44a2db03;p=thirdparty%2Fdhcpcd.git Only process IPv6 neighbour messages from the link socket if we have inited our internal IPv6 state. --- diff --git a/ipv6nd.c b/ipv6nd.c index 3cbdd892..a277889e 100644 --- a/ipv6nd.c +++ b/ipv6nd.c @@ -350,10 +350,12 @@ ipv6nd_neighbour(struct dhcpcd_ctx *ctx, struct in6_addr *addr, int flags) { struct ra *rap; - TAILQ_FOREACH(rap, ctx->ipv6->ra_routers, next) { - if (IN6_ARE_ADDR_EQUAL(&rap->from, addr)) { - ipv6nd_reachable(rap, flags); - break; + if (ctx->ipv6) { + TAILQ_FOREACH(rap, ctx->ipv6->ra_routers, next) { + if (IN6_ARE_ADDR_EQUAL(&rap->from, addr)) { + ipv6nd_reachable(rap, flags); + break; + } } } }