From: Roy Marples Date: Mon, 28 Jul 2008 09:17:07 +0000 (+0000) Subject: Fix --noipv4ll option from timing out right away. X-Git-Tag: v4.0.2~121 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e514c7dd1102311611a838b9009674959a25547c;p=thirdparty%2Fdhcpcd.git Fix --noipv4ll option from timing out right away. --- diff --git a/client.c b/client.c index 8be18930..f8dbd31c 100644 --- a/client.c +++ b/client.c @@ -619,8 +619,6 @@ client_setup(struct if_state *state, const struct options *options) if (options->timeout > 0 && !(state->options & DHCPCD_DAEMONISED)) { - tv.tv_sec = options->timeout; - tv.tv_usec = 0; if (state->options & DHCPCD_IPV4LL) { state->stop.tv_sec = state->start.tv_sec; state->stop.tv_usec = state->stop.tv_usec; @@ -631,8 +629,8 @@ client_setup(struct if_state *state, const struct options *options) } } else if (!(state->options & DHCPCD_BACKGROUND)) { state->exit.tv_sec = state->start.tv_sec; - state->exit.tv_usec = state->start.tv_sec; - state->stop.tv_sec += options->timeout; + state->exit.tv_usec = state->start.tv_usec; + state->exit.tv_sec += options->timeout; } } return 0;