From: Roy Marples Date: Wed, 17 Sep 2008 08:29:56 +0000 (+0000) Subject: Fix rebooting off a signal. X-Git-Tag: v5.0.0~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2173751b6eb4d404b1f157da310d6fc3b86ef49;p=thirdparty%2Fdhcpcd.git Fix rebooting off a signal. --- 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");