]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix rebooting off a signal.
authorRoy Marples <roy@marples.name>
Wed, 17 Sep 2008 08:29:56 +0000 (08:29 +0000)
committerRoy Marples <roy@marples.name>
Wed, 17 Sep 2008 08:29:56 +0000 (08:29 +0000)
dhcpcd.c

index 5450cd49e28bfc9f39ed029abc7161cad29007e2..d883beee7d2eab479eedb5655aee451ae58db665 100644 (file)
--- 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");