]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Check we have allocated IPv6 resources before checkings RA's.
authorRoy Marples <roy@marples.name>
Thu, 18 Sep 2014 13:38:46 +0000 (13:38 +0000)
committerRoy Marples <roy@marples.name>
Thu, 18 Sep 2014 13:38:46 +0000 (13:38 +0000)
Fixes [1e770ea479].

ipv6nd.c

index 1dcb24a66fe66f446748ad117417397265f6d20d..794ef9dcc4115880877d7fa620c4af7c70980fce 100644 (file)
--- 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) {