From: Roy Marples Date: Tue, 21 Oct 2008 15:34:52 +0000 (+0000) Subject: We should erase the lease file when we get an ARP conflict on rebinding from it. X-Git-Tag: v5.0.0~203 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=75fafed825ec7580e9a0a3d659d9fa1bff5741ce;p=thirdparty%2Fdhcpcd.git We should erase the lease file when we get an ARP conflict on rebinding from it. --- diff --git a/arp.c b/arp.c index e32af369..35941df9 100644 --- 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