]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
If we timeout, remove any waitip config so that we daemonise
authorRoy Marples <roy@marples.name>
Sat, 5 Oct 2013 16:28:33 +0000 (16:28 +0000)
committerRoy Marples <roy@marples.name>
Sat, 5 Oct 2013 16:28:33 +0000 (16:28 +0000)
correctly.

dhcpcd.c

index cd1ed64062fa13f452bf5a512b042bcb50981426..36d73824cf72a6eeb56129dee48f63bdd810c909 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -188,6 +188,11 @@ handle_exit_timeout(__unused void *arg)
        syslog(LOG_ERR, "timed out");
        if (!(options & DHCPCD_IPV4) || !(options & DHCPCD_TIMEOUT_IPV4LL)) {
                if (options & DHCPCD_MASTER) {
+                       /* We've timed out, so remove the waitip requirements.
+                        * If the user doesn't like this they can always set
+                        * an infinite timeout. */
+                       options &=
+                           ~(DHCPCD_WAITIP | DHCPCD_WAITIP4 | DHCPCD_WAITIP6);
                        daemonise();
                        return;
                } else