]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix build on old BSD.
authorRoy Marples <roy@marples.name>
Sun, 12 Apr 2020 13:59:52 +0000 (14:59 +0100)
committerRoy Marples <roy@marples.name>
Sun, 12 Apr 2020 13:59:52 +0000 (14:59 +0100)
src/dhcp6.c

index 3ad5d9ca72c9cdb2a1fc86402c6238ac8f0e0f3a..9517f15602db36f3afc62918df87594afefdc6aa 100644 (file)
@@ -3943,16 +3943,17 @@ dhcp6_free(struct interface *ifp)
 void
 dhcp6_abort(struct interface *ifp)
 {
-#ifdef ND6_ADVERTISE
        struct dhcp6_state *state;
+#ifdef ND6_ADVERTISE
        struct ipv6_addr *ia;
 #endif
 
        eloop_timeout_delete(ifp->ctx->eloop, dhcp6_start1, ifp);
-#ifdef ND6_ADVERTISE
        state = D6_STATE(ifp);
        if (state == NULL)
                return;
+
+#ifdef ND6_ADVERTISE
        TAILQ_FOREACH(ia, &state->addrs, next) {
                ipv6nd_advertise(ia);
        }