summaryrefslogtreecommitdiffstats
path: root/ipv6nd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2016-07-26 21:05:18 +0000
committerRoy Marples <roy@marples.name>2016-07-26 21:05:18 +0000
commitd3826f33d84a5946b297551df277eada5c64b6df (patch)
tree7f069b4cbe84a6a9d7df11cc9289fe582c547308 /ipv6nd.c
parentfee9f6e080ff9ea9ac187d516408050879a8797c (diff)
downloaddhcpcd-d3826f33d84a5946b297551df277eada5c64b6df.tar.xz
Fix a crash accidently introduced prior patch.
Diffstat (limited to 'ipv6nd.c')
-rw-r--r--ipv6nd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipv6nd.c b/ipv6nd.c
index 95eda6b2..c839cecd 100644
--- 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;