]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[dhcp] Accept ProxyDHCP replies of type DHCPOFFER
authorJoshua Oreman <oremanj@rwcr.net>
Tue, 3 Nov 2009 18:31:12 +0000 (13:31 -0500)
committerMarty Connor <mdc@etherboot.org>
Thu, 14 Jan 2010 23:33:31 +0000 (18:33 -0500)
The PXE standard provides examples of ProxyDHCP responses being encoded both
as type DHCPOFFER and DHCPACK, but currently we only accept DHCPACKs. Since
there are PXE servers in existence that respond to ProxyDHCPREQUESTs with
DHCPOFFERs, modify gPXE's ProxyDHCP pruning logic to treat both types of
responses equally.

Signed-off-by: Marty Connor <mdc@etherboot.org>
src/net/udp/dhcp.c

index b0dd9529212be80d0f4c79e7e451747dadffe8e8..ac4f82c2cee3287ca55f3d443d13c841a9387d15 100644 (file)
@@ -627,7 +627,7 @@ static void dhcp_proxy_rx ( struct dhcp_session *dhcp,
        /* Filter out unacceptable responses */
        if ( peer->sin_port != dhcp->proxy_port )
                return;
-       if ( msgtype != DHCPACK )
+       if ( ( msgtype != DHCPOFFER ) && ( msgtype != DHCPACK ) )
                return;
        if ( server_id.s_addr /* Linux PXE server omits server ID */ &&
             ( server_id.s_addr != dhcp->proxy_server.s_addr ) )