diff options
author | Michael Brown | 2008-06-11 07:20:49 +0200 |
---|---|---|
committer | Michael Brown | 2008-06-11 07:20:49 +0200 |
commit | 3a2c8a269029495c20b2c660642651a9705ffbb8 (patch) | |
tree | 6e77ef9582d485e749fd41cf9287d457c08ff8b2 /src/net/udp/dhcp.c | |
parent | [slam] Request all remaining blocks if we run out of space for the blocklist (diff) | |
download | ipxe-3a2c8a269029495c20b2c660642651a9705ffbb8.tar.gz ipxe-3a2c8a269029495c20b2c660642651a9705ffbb8.tar.xz ipxe-3a2c8a269029495c20b2c660642651a9705ffbb8.zip |
[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.
Diffstat (limited to 'src/net/udp/dhcp.c')
-rw-r--r-- | src/net/udp/dhcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c index 0ce3c19d..6ff8afe9 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; |