summaryrefslogtreecommitdiffstats
path: root/src
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
commit717e0411669be2f39460c7fb3952f55024883485 (patch)
tree30582be4cc98a04056bb64daef3f42d6a5914669 /src
parent541d1083777125c32c789bf282a5232f832cc0fc (diff)
downloaddhcpcd-717e0411669be2f39460c7fb3952f55024883485.tar.xz
inet6: Don't regen temporary addresses without an IPv6 state
As this is not possible.
Diffstat (limited to 'src')
-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))