]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Restore logic on when to open an address specific socket (#502)
authorDoug Nazar <nazard@nazar.ca>
Fri, 25 Apr 2025 19:37:54 +0000 (15:37 -0400)
committerGitHub <noreply@github.com>
Fri, 25 Apr 2025 19:37:54 +0000 (20:37 +0100)
850f93b changed the logic while moving things around. Restore
the original logic so we open a socket even if the address is the
same, so long as it's the first time.

src/dhcp.c

index b294bd67f0bd13b371caa01c9ceeebab2dedf973..637f5a86aa6f1b119997c7bb91a768d65b10cbef 100644 (file)
@@ -2384,8 +2384,8 @@ dhcp_bound(struct interface *ifp, uint8_t old_state)
        if (ctx->options & DHCPCD_MANAGER ||
            ifp->options->options & DHCPCD_STATIC ||
            (state->old != NULL &&
-               state->old->yiaddr == state->new->yiaddr) ||
-           (old_state & STATE_ADDED && !(old_state & STATE_FAKE)))
+            state->old->yiaddr == state->new->yiaddr &&
+            old_state & STATE_ADDED && !(old_state & STATE_FAKE)))
                return;
 
        dhcp_closeinet(ifp);