]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Only test not BOUND when finishing DAD
authorRoy Marples <roy@marples.name>
Tue, 30 Aug 2022 16:23:27 +0000 (17:23 +0100)
committerRoy Marples <roy@marples.name>
Tue, 30 Aug 2022 16:26:07 +0000 (17:26 +0100)
This fixes using a last lease on initial boot when the DHCP
server is not present.

src/dhcp.c

index 2f221bc71d9d6059975340f7a3d6b5be60ec6597..c72135ec41ef44954b80b04d3ba400353df39ca0 100644 (file)
@@ -2005,7 +2005,7 @@ dhcp_finish_dad(struct interface *ifp, struct in_addr *ia)
 {
        struct dhcp_state *state = D_STATE(ifp);
 
-       if (state->state != DHS_PROBE)
+       if (state->state == DHS_BOUND)
                return;
        if (state->offer == NULL || state->offer->yiaddr != ia->s_addr)
                return;