From: Roy Marples Date: Tue, 26 Jan 2010 08:07:21 +0000 (+0000) Subject: If we reboot an old valid lease but fail to ACK it, we need to X-Git-Tag: v5.1.5~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0026737b7a4cfa674d062dbc79287881e47e6467;p=thirdparty%2Fdhcpcd.git If we reboot an old valid lease but fail to ACK it, we need to clear the address when discovering. --- diff --git a/dhcpcd.c b/dhcpcd.c index ea6803b3..b91a02e0 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -403,6 +403,7 @@ start_expire(void *arg) iface->state->interval = 0; if (iface->addr.s_addr == 0) { /* We failed to reboot, so enter discovery. */ + iface->state->lease.addr.s_addr = 0; start_discover(iface); return; } @@ -1166,6 +1167,8 @@ start_interface(void *arg) if ((time_t)iface->state->lease.leasetime < now.tv_sec - st.st_mtime) { + syslog(LOG_DEBUG, + "%s: discarding expired lease", iface->name); free(iface->state->offer); iface->state->offer = NULL; } else {