Browse Source

[dhcp] Accept ProxyDHCP replies of type DHCPOFFER

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>
tags/v1.0.0-rc1
Joshua Oreman 14 years ago
parent
commit
04e4a4f695
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/net/udp/dhcp.c

+ 1
- 1
src/net/udp/dhcp.c View File

@@ -627,7 +627,7 @@ static void dhcp_proxy_rx ( struct dhcp_session *dhcp,
627 627
 	/* Filter out unacceptable responses */
628 628
 	if ( peer->sin_port != dhcp->proxy_port )
629 629
 		return;
630
-	if ( msgtype != DHCPACK )
630
+	if ( ( msgtype != DHCPOFFER ) && ( msgtype != DHCPACK ) )
631 631
 		return;
632 632
 	if ( server_id.s_addr /* Linux PXE server omits server ID */ &&
633 633
 	     ( server_id.s_addr != dhcp->proxy_server.s_addr ) )

Loading…
Cancel
Save