]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We should really enter the rebinding state on a requested renew as we're broadcasting...
authorRoy Marples <roy@marples.name>
Tue, 19 Aug 2008 13:31:59 +0000 (13:31 +0000)
committerRoy Marples <roy@marples.name>
Tue, 19 Aug 2008 13:31:59 +0000 (13:31 +0000)
client.c

index b085f9709320840ea8c755f56dadde49c71c2592..fbb4deed2563ea357c1655d7217c7f785e89ee47 100644 (file)
--- a/client.c
+++ b/client.c
@@ -1247,15 +1247,15 @@ handle_timeout(struct if_state *state, const struct options *options)
 
        switch(state->state) {
        case STATE_RENEW_REQUESTED:
-               /* If a renew was requested (ie, didn't timeout)
-                * we need to remove the server address so we enter the
-                * INIT-REBOOT state correctly. */
+               /* If a renew was requested (ie, didn't timeout) we actually
+                * enter the REBIND state so that we broadcast to all servers.
+                * We need to do this for when we change networks. */
                lease->server.s_addr = 0;
                state->messages = 0;
                if (lease->addr.s_addr && !(state->options & DHCPCD_INFORM)) {
-                       logger(LOG_INFO, "renewing lease of %s",
+                       logger(LOG_INFO, "rebinding lease of %s",
                               inet_ntoa(lease->addr));
-                       state->state = STATE_RENEWING;
+                       state->state = STATE_REBINDING;
                        state->stop.tv_sec = options->timeout;
                        state->stop.tv_usec = 0;
                        break;