]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We should timeout when in background for IPv4LL.
authorRoy Marples <roy@marples.name>
Mon, 21 Jul 2008 06:12:33 +0000 (06:12 +0000)
committerRoy Marples <roy@marples.name>
Mon, 21 Jul 2008 06:12:33 +0000 (06:12 +0000)
client.c

index 4bfebd1a7b0a08443d68fab91b5f1ecb6f743ae8..fc7cb3fb7c51bb972011d3e7f1b315a11ee031ba 100644 (file)
--- a/client.c
+++ b/client.c
@@ -610,16 +610,17 @@ client_setup(struct if_state *state, const struct options *options)
        }
 
        if (options->timeout > 0 &&
-           !(state->options & DHCPCD_BACKGROUND) &&
            !(state->options & DHCPCD_DAEMONISED))
        {
                tv.tv_sec = options->timeout;
                tv.tv_usec = 0;
                if (state->options & DHCPCD_IPV4LL) {
                        timeradd(&state->start, &tv, &state->stop);
-                       tv.tv_sec = 10;
-                       timeradd(&state->stop, &tv, &state->exit);
-               } else
+                       if (!(state->options & DHCPCD_BACKGROUND)) {
+                               tv.tv_sec = 10;
+                               timeradd(&state->stop, &tv, &state->exit);
+                       }
+               } else if (!(state->options & DHCPCD_BACKGROUND))
                        timeradd(&state->start, &tv, &state->exit);
        }
        return 0;