]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: Fix infinite INFORM messages
authorKaelan Mikowicz <eternity01033@gmail.com>
Thu, 14 Oct 2021 05:14:45 +0000 (22:14 -0700)
committerGitHub <noreply@github.com>
Thu, 14 Oct 2021 05:14:45 +0000 (06:14 +0100)
When an address is configured on the interface, do not send an
INFORM message if the interface is already bound.

Fixes #48

src/dhcp.c

index 0e1ac3eb0671943beae833e2558f974c2581ed81..5c38bbeb2fe55f88b1485a0f16109bbb1ff762a8 100644 (file)
@@ -4270,7 +4270,7 @@ dhcp_handleifa(int cmd, struct ipv4_addr *ia, pid_t pid)
 #endif
 
        if (ifo->options & DHCPCD_INFORM) {
-               if (state->state != DHS_INFORM)
+               if (state->state != DHS_INFORM && state->state != DHS_BOUND)
                        dhcp_inform(ifp);
                return ia;
        }