summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Oreman2009-11-03 19:31:12 +0100
committerMarty Connor2010-01-15 00:33:31 +0100
commit04e4a4f69520422d7ff7f02ba0f6d9a9dd084ee2 (patch)
treeabe2c399f57a57b779609b3eb36edf0e8720ed03
parent[skge] Note correct author of akge driver (diff)
downloadipxe-04e4a4f69520422d7ff7f02ba0f6d9a9dd084ee2.tar.gz
ipxe-04e4a4f69520422d7ff7f02ba0f6d9a9dd084ee2.tar.xz
ipxe-04e4a4f69520422d7ff7f02ba0f6d9a9dd084ee2.zip
[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>
-rw-r--r--src/net/udp/dhcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index b0dd9529..ac4f82c2 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -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 ) )