david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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:
Michael Brown 2008-06-11 06:20:49 +01:00
parent 2456b9b4ba
commit 3a2c8a2690
1 changed files with 1 additions and 1 deletions

View File

@ -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;