]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
DHCP: When rebinding ensure we have a DHCP ARP state
authorRoy Marples <roy@marples.name>
Tue, 5 Nov 2019 21:54:32 +0000 (21:54 +0000)
committerRoy Marples <roy@marples.name>
Tue, 5 Nov 2019 21:54:32 +0000 (21:54 +0000)
So we can defend the address.

src/dhcp.c

index 7e590df9d60938436ba3fa94a5df9bcc63e0d3bf..e3f7aecdbc59cae1b3467b13e67c5b2aa2c13ed1 100644 (file)
@@ -2608,6 +2608,11 @@ dhcp_reboot(struct interface *ifp)
            ifp->name, inet_ntoa(state->lease.addr));
 
 #ifdef ARP
+#ifndef KERNEL_RFC5227
+       /* Create the DHCP ARP state so we can defend it. */
+       (void)dhcp_arp_new(ifp, &state->lease.addr);
+#endif
+
        /* If the address exists on the interface and no other interface
         * is currently using it then announce it to ensure this
         * interface gets the reply. */