summaryrefslogtreecommitdiffstats
path: root/src/ipv6.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2020-04-16 23:28:34 +0100
committerRoy Marples <roy@marples.name>2020-04-16 23:28:34 +0100
commit023d14bec128f9031ec694c7a84fcabeedb68366 (patch)
tree30582be4cc98a04056bb64daef3f42d6a5914669 /src/ipv6.c
parentf60d67910624bd0ef43bf7b99e7cd07090118ac0 (diff)
downloaddhcpcd-023d14bec128f9031ec694c7a84fcabeedb68366.tar.xz
inet6: Don't regen temporary addresses without an IPv6 state
As this is not possible.
Diffstat (limited to 'src/ipv6.c')
-rw-r--r--src/ipv6.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ipv6.c b/src/ipv6.c
index 570879ae..3e0dcc0c 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -2073,10 +2073,13 @@ ipv6_regentempaddrs(void *arg)
struct ipv6_state *state;
struct ipv6_addr *ia;
+ state = IPV6_STATE(ifp);
+ if (state == NULL)
+ return;
+
ipv6_regen_desync(ifp, true);
clock_gettime(CLOCK_MONOTONIC, &tv);
- state = IPV6_STATE(ifp);
TAILQ_FOREACH(ia, &state->addrs, next) {
if (ia->flags & IPV6_AF_TEMPORARY &&
!(ia->flags & IPV6_AF_STALE))