]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Don't reset the counters unless we should. dhcpcd should now be fully conformant...
authorRoy Marples <roy@marples.name>
Wed, 6 Aug 2008 09:32:58 +0000 (09:32 +0000)
committerRoy Marples <roy@marples.name>
Wed, 6 Aug 2008 09:32:58 +0000 (09:32 +0000)
client.c

index c100395e911610a0068b66af6df9096fa2863339..ef79051d05c139989c591cbdbb90a4815c6341ca 100644 (file)
--- 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;
                }