From: Roy Marples Date: Tue, 19 Aug 2008 13:31:59 +0000 (+0000) Subject: We should really enter the rebinding state on a requested renew as we're broadcasting... X-Git-Tag: v4.0.2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3deb5188ef227de2294c1fcc679bd74accc08091;p=thirdparty%2Fdhcpcd.git We should really enter the rebinding state on a requested renew as we're broadcasting instead of unicasting. --- diff --git a/client.c b/client.c index b085f970..fbb4deed 100644 --- 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;