changeset 993:d87fee3f2bf3 draft

Fix rebooting off a signal.
author Roy Marples <roy@marples.name>
date Wed, 17 Sep 2008 08:29:56 +0000
parents 04cbf8a229d3
children 2f75a16390e0
files dhcpcd.c
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/dhcpcd.c	Tue Sep 16 13:17:23 2008 +0000
+++ b/dhcpcd.c	Wed Sep 17 08:29:56 2008 +0000
@@ -737,9 +737,12 @@
 	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 @@
 	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");