]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Fix IPv4LL when backgrounding.
authorRoy Marples <roy@marples.name>
Sat, 19 Jul 2008 17:06:54 +0000 (17:06 +0000)
committerRoy Marples <roy@marples.name>
Sat, 19 Jul 2008 17:06:54 +0000 (17:06 +0000)
client.c

index 019f45b6a6904a769246d0c706ecb969614bd8fc..9aad99e7cc23f6a282ddaaa1383b7580ad17ed1c 100644 (file)
--- a/client.c
+++ b/client.c
@@ -608,16 +608,16 @@ client_setup(struct if_state *state, const struct options *options)
                }
        }
 
-       if (options->timeout > 0 &&
-           !(state->options & DHCPCD_BACKGROUND))
-       {
+       if (options->timeout > 0) {
                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;