It could happen that the renew/rebind times in the leasefile were
expired but the expire time itself was still valid and in the future. If this happened we ended up using the state S_RENEW with an INADDR_BROADCAST address set in the request and dhclient never got any answer back. The only workaround was to delete the lease file. Fix this case with a check for the S_RENEW and a fallback to the S_INIT state. PR: bin/69361 Submitted by: Andrew Gallatin <gallatin@cs.duke.edu>
This commit is contained in:
parent
c3c04b646f
commit
222bb5ab84
@ -1735,9 +1735,20 @@ void send_request (cpp)
|
||||
broadcast the DHCPREQUEST rather than unicasting. */
|
||||
if (client -> state == S_REQUESTING ||
|
||||
client -> state == S_REBOOTING ||
|
||||
cur_time > client -> active -> rebind)
|
||||
cur_time > client -> active -> rebind) {
|
||||
#ifdef ENABLE_POLLING_MODE
|
||||
/*
|
||||
* If our state is S_RENEWING we definitly
|
||||
* have to go through S_INIT first. This can
|
||||
* happen only if ENABLE_POLLING_MODE is defined.
|
||||
*/
|
||||
if (client -> state == S_RENEWING) {
|
||||
state_init (client);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
destination.sin_addr = sockaddr_broadcast.sin_addr;
|
||||
else
|
||||
} else
|
||||
memcpy (&destination.sin_addr.s_addr,
|
||||
client -> destination.iabuf,
|
||||
sizeof destination.sin_addr.s_addr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user