changeset 2496:060f513c07b4 draft

Only process IPv6 neighbour messages from the link socket if we have inited our internal IPv6 state.
author Roy Marples <roy@marples.name>
date Thu, 29 May 2014 06:43:54 +0000
parents 8a285cbcdd74
children 61ce8921b6cd
files ipv6nd.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ipv6nd.c	Sat May 24 20:11:42 2014 +0000
+++ b/ipv6nd.c	Thu May 29 06:43:54 2014 +0000
@@ -350,10 +350,12 @@
 {
 	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;
+			}
 		}
 	}
 }