]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Check IPv6 state before regenerating random seeds. Fixes [eb1ef6a62b].
authorRoy Marples <roy@marples.name>
Wed, 18 Feb 2015 16:52:49 +0000 (16:52 +0000)
committerRoy Marples <roy@marples.name>
Wed, 18 Feb 2015 16:52:49 +0000 (16:52 +0000)
ipv6.c

diff --git a/ipv6.c b/ipv6.c
index 8cf27b9563a4a3d416153d782f36ad673687427d..abc2d85941ce7421148c34772aec6a54b7f8d8f1 100644 (file)
--- a/ipv6.c
+++ b/ipv6.c
@@ -1371,7 +1371,9 @@ ipv6_gentempifid(struct interface *ifp)
        uint8_t seed[16], digest[16];
        int retry;
 
-       state = IPV6_STATE(ifp);
+       if ((state = IPV6_STATE(ifp)) == NULL)
+               return;
+
        retry = 0;
        if (memcmp(nullid, state->randomseed0, sizeof(nullid)) == 0) {
                uint32_t r;