summaryrefslogtreecommitdiffstats
path: root/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-09-18 13:38:46 +0000
committerRoy Marples <roy@marples.name>2014-09-18 13:38:46 +0000
commitfe6c1b9d5810794d96470b1b93fb86684c24d570 (patch)
treee9a99d26ad62ee3f388296f3fee54e16d165ee5d /ipv6nd.c
parentba1707605838fa5b8e476256436bd51e59cc733f (diff)
downloaddhcpcd-fe6c1b9d5810794d96470b1b93fb86684c24d570.tar.xz
Check we have allocated IPv6 resources before checkings RA's.
Fixes [1e770ea479].
Diffstat (limited to 'ipv6nd.c')
-rw-r--r--ipv6nd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ipv6nd.c b/ipv6nd.c
index 1dcb24a6..794ef9dc 100644
--- 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) {