]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
On NAK, clear the timer and lease so we init correctly.
authorRoy Marples <roy@marples.name>
Thu, 12 Jun 2008 08:57:29 +0000 (08:57 +0000)
committerRoy Marples <roy@marples.name>
Thu, 12 Jun 2008 08:57:29 +0000 (08:57 +0000)
client.c

index 89302652c355968b15e2138f351dd3e697138021..aacacb79f37f6c75639f8a0e925d9c7b419c0aca 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1160,6 +1160,8 @@ handle_dhcp(struct if_state *state, struct dhcp_message **dhcpp,
                free(addr);
                state->state = STATE_INIT;
                state->timeout = 0;
+               lease->addr.s_addr = 0;
+               timerclear(&state->stop);
 
                /* If we constantly get NAKS then we should slowly back off */
                if (state->nakoff > 0) {