summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-17 08:29:56 +0000
committerRoy Marples <roy@marples.name>2008-09-17 08:29:56 +0000
commitb2173751b6eb4d404b1f157da310d6fc3b86ef49 (patch)
treea0f11b0f06fc700fbfdf1bfc66ad0e3c7c4c5fe9 /dhcpcd.c
parent2662d5195f4c8200be223bad3656903e3db16548 (diff)
downloaddhcpcd-b2173751b6eb4d404b1f157da310d6fc3b86ef49.tar.xz
Fix rebooting off a signal.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 5450cd49..d883beee 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -737,9 +737,12 @@ start_reboot(struct interface *iface)
else
add_timeout_sec(ifo->reboot, start_expire, iface);
open_sockets(iface);
- if (ifo->options & DHCPCD_ARP)
+ if (ifo->options & DHCPCD_ARP &&
+ !has_address(iface, &iface->state->lease.addr, NULL))
+ {
+ iface->state->probes = 0;
send_arp_probe(iface);
- else
+ } else
send_request(iface);
}
@@ -947,7 +950,7 @@ handle_signal(_unused void *arg)
case SIGALRM:
syslog(LOG_INFO, "received SIGALRM, rebinding lease");
for (iface = ifaces; iface; iface = iface->next)
- start_reboot(iface);
+ start_interface(iface);
return;
case SIGHUP:
syslog(LOG_INFO, "received SIGHUP, releasing lease");