]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Only process IPv6 neighbour messages from the link socket if we have inited
authorRoy Marples <roy@marples.name>
Thu, 29 May 2014 06:43:54 +0000 (06:43 +0000)
committerRoy Marples <roy@marples.name>
Thu, 29 May 2014 06:43:54 +0000 (06:43 +0000)
our internal IPv6 state.

ipv6nd.c

index 3cbdd892c3cde03ee7808fc271023f4b051d7a37..a277889e4d1268eeeaf77b9a25278cc4f7972627 100644 (file)
--- 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;
+                       }
                }
        }
 }