]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We should erase the lease file when we get an ARP conflict on rebinding from it.
authorRoy Marples <roy@marples.name>
Tue, 21 Oct 2008 15:34:52 +0000 (15:34 +0000)
committerRoy Marples <roy@marples.name>
Tue, 21 Oct 2008 15:34:52 +0000 (15:34 +0000)
arp.c

diff --git a/arp.c b/arp.c
index e32af369f589ed09b6774de4506bc6f934a4f2ba..35941df94f7678d7a8e2092a8840f3b8f7b432a9 100644 (file)
--- a/arp.c
+++ b/arp.c
@@ -81,10 +81,17 @@ handle_arp_failure(struct interface *iface)
                handle_ipv4ll_failure(iface);
                return;
        }
-       if (!iface->state->lease.frominfo)
+       if (iface->state->lease.frominfo)
+               unlink(iface->leasefile);
+       else
                send_decline(iface);
        close_sockets(iface);
-       add_timeout_sec(DHCP_ARP_FAIL, start_interface, iface);
+       delete_timeout(NULL, iface);
+
+       if (iface->state->lease.frominfo)
+               start_interface(iface);
+       else
+               add_timeout_sec(DHCP_ARP_FAIL, start_interface, iface);
 }
 
 static void