]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
inet6: Don't regen temporary addresses without an IPv6 state
authorRoy Marples <roy@marples.name>
Thu, 16 Apr 2020 22:28:34 +0000 (23:28 +0100)
committerRoy Marples <roy@marples.name>
Thu, 16 Apr 2020 22:28:34 +0000 (23:28 +0100)
As this is not possible.

src/ipv6.c

index 570879ae50c52cedb4f43aac2cd9e2ea0aa0d299..3e0dcc0c76aade33dea987b24cac510bc2699de8 100644 (file)
@@ -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))