瀏覽代碼

[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.
tags/v0.9.4
Michael Brown 16 年之前
父節點
當前提交
f178436bb1
共有 1 個文件被更改,包括 3 次插入5 次删除
  1. 3
    5
      src/net/fakedhcp.c

+ 3
- 5
src/net/fakedhcp.c 查看文件

@@ -181,11 +181,9 @@ int create_fakeproxydhcpack ( struct net_device *netdev,
181 181
 	/* Identify ProxyDHCP settings */
182 182
 	settings = find_settings ( PROXYDHCP_SETTINGS_NAME );
183 183
 
184
-	/* No ProxyDHCP settings => return empty block */
185
-	if ( ! settings ) {
186
-		memset ( data, 0, max_len );
187
-		return 0;
188
-	}
184
+	/* No ProxyDHCP settings => use normal DHCPACK */
185
+	if ( ! settings )
186
+		return create_fakedhcpack ( netdev, data, max_len );
189 187
 
190 188
 	/* Create base DHCPACK packet */
191 189
 	if ( ( rc = dhcp_create_packet ( &dhcppkt, netdev, DHCPACK, NULL,

Loading…
取消
儲存