summaryrefslogtreecommitdiffstats
path: root/arp.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-10-21 15:34:52 +0000
committerRoy Marples <roy@marples.name>2008-10-21 15:34:52 +0000
commit75fafed825ec7580e9a0a3d659d9fa1bff5741ce (patch)
treec49deb9ed1b26643e185c3155858f3d42e0f13e9 /arp.c
parentd4ba058f6102e4968257b2164467755885c5aea6 (diff)
downloaddhcpcd-75fafed825ec7580e9a0a3d659d9fa1bff5741ce.tar.xz
We should erase the lease file when we get an ARP conflict on rebinding from it.
Diffstat (limited to 'arp.c')
-rw-r--r--arp.c11
1 files changed, 9 insertions, 2 deletions
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