Browse Source

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

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

361
 	has_pxeclient = ( ( vci_len >= ( int ) sizeof ( vci ) ) &&
361
 	has_pxeclient = ( ( vci_len >= ( int ) sizeof ( vci ) ) &&
362
 			  ( strncmp ( "PXEClient", vci, sizeof (vci) ) == 0 ));
362
 			  ( strncmp ( "PXEClient", vci, sizeof (vci) ) == 0 ));
363
 
363
 
364
-	/* Identify presence of vendor-specific options */
365
-	pxeopts_len = dhcppkt_fetch ( dhcppkt, DHCP_VENDOR_ENCAP, NULL, 0 );
364
+	/* Identify presence of PXE-specific options */
365
+	pxeopts_len = dhcppkt_fetch ( dhcppkt, DHCP_PXE_BOOT_MENU, NULL, 0 );
366
 	has_pxeopts = ( pxeopts_len >= 0 );
366
 	has_pxeopts = ( pxeopts_len >= 0 );
367
 	if ( has_pxeclient )
367
 	if ( has_pxeclient )
368
 		DBGC ( dhcp, "%s", ( has_pxeopts ? " pxe" : " proxy" ) );
368
 		DBGC ( dhcp, "%s", ( has_pxeopts ? " pxe" : " proxy" ) );

Loading…
Cancel
Save