aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2008-08-02 03:03:42 +0100
committerMichael Brown <mcb30@etherboot.org>2008-08-02 03:03:42 +0100
commitf178436bb1be3cb312e9904da89ab42ccb3a976b (patch)
tree0a1a807a31fb11a12b3fa06ce1ebe339ad09d762
parented73d535032c39914b2dbdfeff7259f15938f15b (diff)
downloadipxe-f178436bb1be3cb312e9904da89ab42ccb3a976b.tar.gz
[pxe] If no ProxyDHCPACK exists, use DHCPACK for the fake ProxyDHCPACK 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.
-rw-r--r--src/net/fakedhcp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/net/fakedhcp.c b/src/net/fakedhcp.c
index a10e442b1..60264756f 100644
--- a/src/net/fakedhcp.c
+++ b/src/net/fakedhcp.c
@@ -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,