Skip to content

Commit

Permalink
[pxe] If no ProxyDHCPACK exists, use DHCPACK for the fake ProxyDHCPAC…
Browse files Browse the repository at this point in the history
…K packet

WinPE seems to have a bug that causes it to always use the TFTP server
IP address and filename from the ProxyDHCPACK packet, even if the
ProxyDHCPACK packet doesn't exist.  This causes it to end up
attempting to fetch a file such as

  tftp://0.0.0.0/bootmgr.exe

If we don't have a ProxyDHCPACK to use, we pretend that it was a copy
of the DHCPACK packet.  This works around the problem, and hopefully
won't surprise any NBPs.
  • Loading branch information
Michael Brown committed Aug 2, 2008
1 parent ed73d53 commit f178436
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/net/fakedhcp.c
Expand Up @@ -181,11 +181,9 @@ int create_fakeproxydhcpack ( struct net_device *netdev,
/* Identify ProxyDHCP settings */
settings = find_settings ( PROXYDHCP_SETTINGS_NAME );

/* No ProxyDHCP settings => return empty block */
if ( ! settings ) {
memset ( data, 0, max_len );
return 0;
}
/* No ProxyDHCP settings => use normal DHCPACK */
if ( ! settings )
return create_fakedhcpack ( netdev, data, max_len );

/* Create base DHCPACK packet */
if ( ( rc = dhcp_create_packet ( &dhcppkt, netdev, DHCPACK, NULL,
Expand Down

0 comments on commit f178436

Please sign in to comment.