]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[dhcp] Do not restrict minimum retry time for ProxyDHCPREQUEST
authorMichael Brown <mcb30@etherboot.org>
Wed, 13 Aug 2008 20:51:53 +0000 (21:51 +0100)
committerMichael Brown <mcb30@etherboot.org>
Wed, 13 Aug 2008 20:51:53 +0000 (21:51 +0100)
The ProxyDHCPREQUEST is a unicast packet, so the first request will
almost always be lost due to not having the IP address in the ARP
cache.  If the minimum retry time is set to one second (as per commit
ff2b6a5), then ProxyDHCP will time out and give up before managing to
successfully transmit a request.

The DHCP timers need to be reworked anyway, so this mild hack is
acceptable for now.

src/net/udp/dhcp.c

index 149bdfb58ffaffb881248a9a254eb8ef71ff6441..5fcd56ea45db5ba42dbc2a21b49b66f24bccdf23 100644 (file)
@@ -818,6 +818,7 @@ static void dhcp_rx_dhcpack ( struct dhcp_session *dhcp,
 
        /* If we have a ProxyDHCPOFFER, transition to PROXYDHCPREQUEST */
        if ( dhcp->proxydhcpoffer ) {
+               dhcp->timer.min_timeout = 0;
                dhcp_set_state ( dhcp, DHCP_STATE_PROXYREQUEST );
                return;
        }