2
0
mirror of https://github.com/xcat2/xNBA.git synced 2025-08-06 03:25:17 +00:00

[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

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;