Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[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>
  • Loading branch information
rwcr authored and Marty Connor committed Jan 14, 2010
1 parent eebe98e commit 04e4a4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/net/udp/dhcp.c
Expand Up @@ -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 ) )
Expand Down

0 comments on commit 04e4a4f

Please sign in to comment.