[dhcp] Do not transition to DHCPREQUEST without a valid DHCPOFFER
A missing test for dhcp->dhcpoffer in dhcp_timer_expired() was causing the client to transition to DHCPREQUEST after timing out on waiting for ProxyDHCP even if no DHCPOFFERs had been received.
This commit is contained in:
parent
2456b9b4ba
commit
3a2c8a2690
|
@ -932,7 +932,7 @@ static void dhcp_timer_expired ( struct retry_timer *timer, int fail ) {
|
|||
}
|
||||
|
||||
/* Give up waiting for ProxyDHCP before we reach the failure point */
|
||||
if ( elapsed > PROXYDHCP_WAIT_TIME ) {
|
||||
if ( dhcp->dhcpoffer && ( elapsed > PROXYDHCP_WAIT_TIME ) ) {
|
||||
if ( dhcp->state == DHCP_STATE_DISCOVER ) {
|
||||
dhcp_set_state ( dhcp, DHCP_STATE_REQUEST );
|
||||
return;
|
||||
|
|
Reference in New Issue