From: Michael Brown Date: Wed, 11 Jun 2008 05:20:49 +0000 (+0100) Subject: [dhcp] Do not transition to DHCPREQUEST without a valid DHCPOFFER X-Git-Tag: v0.9.4~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3a2c8a269029495c20b2c660642651a9705ffbb8;p=thirdparty%2Fipxe.git [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. --- diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c index 0ce3c19d4..6ff8afe9d 100644 --- a/src/net/udp/dhcp.c +++ b/src/net/udp/dhcp.c @@ -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;