From: Roy Marples Date: Sat, 19 Jul 2008 17:06:54 +0000 (+0000) Subject: Fix IPv4LL when backgrounding. X-Git-Tag: v4.0.2~162 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e056cd1ff7442d2eaf22443dad3b96d9d5ed92b1;p=thirdparty%2Fdhcpcd.git Fix IPv4LL when backgrounding. --- diff --git a/client.c b/client.c index 019f45b6..9aad99e7 100644 --- 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;