]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Wait an extra second per interface for IPv4LL timeout.
authorRoy Marples <roy@marples.name>
Sat, 26 Jun 2010 09:08:47 +0000 (09:08 +0000)
committerRoy Marples <roy@marples.name>
Sat, 26 Jun 2010 09:08:47 +0000 (09:08 +0000)
dhcpcd.c

index e89d1aa886ef4fc8c2f78436a3b6dea8d54e85ac..cb33929e7fba36c79a66a94d9cfb817638102be3 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -195,12 +195,16 @@ void
 handle_exit_timeout(_unused void *arg)
 {
        int timeout;
+       struct interface *ifp;
 
        syslog(LOG_ERR, "timed out");
        if (!(options & DHCPCD_TIMEOUT_IPV4LL))
                exit(EXIT_FAILURE);
        options &= ~DHCPCD_TIMEOUT_IPV4LL;
        timeout = (PROBE_NUM * PROBE_MAX) + PROBE_WAIT + 1;
+       /* Add an extra second per interface */
+       for (ifp = ifaces; ifp; ifp = ifp->next)
+               timeout++;
        syslog(LOG_WARNING, "allowing %d seconds for IPv4LL timeout", timeout);
        add_timeout_sec(timeout, handle_exit_timeout, NULL);
 }