summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoshua Oreman2009-11-03 19:37:57 +0100
committerMarty Connor2010-01-15 00:34:55 +0100
commit734061e9c60103439e13d72c68e50ee362f3ba91 (patch)
treec10b9288fdc98bb55a25f2ce4dd4e0c80d6e75b2
parent[dhcp] Accept ProxyDHCP replies of type DHCPOFFER (diff)
downloadipxe-734061e9c60103439e13d72c68e50ee362f3ba91.tar.gz
ipxe-734061e9c60103439e13d72c68e50ee362f3ba91.tar.xz
ipxe-734061e9c60103439e13d72c68e50ee362f3ba91.zip
[dhcp] Assume PXE options are in DHCPOFFER only if boot menu is included
IBM's Tivoli Provisioning Manager for OS Deployment, when acting as a ProxyDHCP server, sends an initial offer with a vendor class of "PXEClient" and vendor-encapsulated options that have nothing to do with PXE. To differentiate between this case and the case of a ProxyDHCP server that sends all PXE options in its initial offer, modify gPXE to check for the presence of an encapsulated PXE boot menu option (43.9) instead of simply checking for the existence of any encapsulated options at all. This is the same check used by the Intel vendor PXE ROM. Signed-off-by: Marty Connor <mdc@etherboot.org>
-rw-r--r--src/net/udp/dhcp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index ac4f82c2..aba90002 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -361,8 +361,8 @@ static void dhcp_discovery_rx ( struct dhcp_session *dhcp,
has_pxeclient = ( ( vci_len >= ( int ) sizeof ( vci ) ) &&
( strncmp ( "PXEClient", vci, sizeof (vci) ) == 0 ));
- /* Identify presence of vendor-specific options */
- pxeopts_len = dhcppkt_fetch ( dhcppkt, DHCP_VENDOR_ENCAP, NULL, 0 );
+ /* Identify presence of PXE-specific options */
+ pxeopts_len = dhcppkt_fetch ( dhcppkt, DHCP_PXE_BOOT_MENU, NULL, 0 );
has_pxeopts = ( pxeopts_len >= 0 );
if ( has_pxeclient )
DBGC ( dhcp, "%s", ( has_pxeopts ? " pxe" : " proxy" ) );