From: Roy Marples Date: Mon, 21 Jul 2008 06:12:33 +0000 (+0000) Subject: We should timeout when in background for IPv4LL. X-Git-Tag: v4.0.2~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03fd6c72e4d8f1e72ee8842d6156cd1b9ad15b2a;p=thirdparty%2Fdhcpcd.git We should timeout when in background for IPv4LL. --- diff --git a/client.c b/client.c index 4bfebd1a..fc7cb3fb 100644 --- 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;