]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix a crash accidently introduced prior patch.
authorRoy Marples <roy@marples.name>
Tue, 26 Jul 2016 21:05:18 +0000 (21:05 +0000)
committerRoy Marples <roy@marples.name>
Tue, 26 Jul 2016 21:05:18 +0000 (21:05 +0000)
ipv6nd.c

index 95eda6b27ba6d93336f4027fa495117d466fd72a..c839cecd46a9ea911513c6b2ff12212447d19492 100644 (file)
--- a/ipv6nd.c
+++ b/ipv6nd.c
@@ -1310,6 +1310,11 @@ ipv6nd_handleifa(int cmd, struct ipv6_addr *addr)
 {
        struct ra *rap;
 
+       /* IPv6 init may not have happened yet if we are learning
+        * existing addresses when dhcpcd starts. */
+       if (addr->iface->ctx->ipv6 == NULL)
+               return;
+
        TAILQ_FOREACH(rap, addr->iface->ctx->ipv6->ra_routers, next) {
                if (rap->iface != addr->iface)
                        continue;