From: Roy Marples Date: Mon, 30 Jun 2008 15:07:23 +0000 (+0000) Subject: Fix timeout when we aren't daemonising. X-Git-Tag: v4.0.2~262 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=215dfd335b62e7f3372e5880f7e3306aa0f08a9a;p=thirdparty%2Fdhcpcd.git Fix timeout when we aren't daemonising. --- diff --git a/client.c b/client.c index b5e684ac..756c9b81 100644 --- a/client.c +++ b/client.c @@ -959,8 +959,10 @@ handle_timeout_fail(struct if_state *state, const struct options *options) reason = "FAIL"; drop_config(state, reason, options); - if (!(state->options & DHCPCD_DAEMONISED)) + if (!(state->options & DHCPCD_DAEMONISED) && + (state->options & DHCPCD_DAEMONISE)) return -1; + state->state = STATE_INIT; break; case STATE_RENEWING: logger(LOG_ERR, "failed to renew, attempting to rebind"); @@ -1068,6 +1070,7 @@ handle_timeout(struct if_state *state, const struct options *options) switch(state->state) { case STATE_INIT: if (!(state->state && DHCPCD_DAEMONISED) && + options->timeout && !IN_LINKLOCAL(htonl(iface->addr.s_addr))) { get_time(&state->start);