From: Roy Marples Date: Wed, 6 Aug 2008 09:32:58 +0000 (+0000) Subject: Don't reset the counters unless we should. dhcpcd should now be fully conformant... X-Git-Tag: v4.0.2~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a6e325fa768765be7f0457c4d9469d193ec8084b;p=thirdparty%2Fdhcpcd.git Don't reset the counters unless we should. dhcpcd should now be fully conformant to RFC2131 and RFC3927 timings. --- diff --git a/client.c b/client.c index c100395e..ef79051d 100644 --- a/client.c +++ b/client.c @@ -1034,7 +1034,8 @@ handle_timeout_fail(struct if_state *state, const struct options *options) timerclear(&state->stop); timerclear(&state->exit); - state->messages = 0; + if (state->state != STATE_DISCOVERING) + state->messages = 0; switch (state->state) { case STATE_INIT: /* FALLTHROUGH */ @@ -1077,7 +1078,8 @@ handle_timeout_fail(struct if_state *state, const struct options *options) state->state = STATE_PROBING; state->claims = 0; state->probes = 0; - state->conflicts = 0; + if (iface->addr.s_addr) + state->conflicts = 0; return 1; }