Ver código fonte

[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 anos atrás
pai
commit
f178436bb1
1 arquivos alterados com 3 adições e 5 exclusões
  1. 3
    5
      src/net/fakedhcp.c

+ 3
- 5
src/net/fakedhcp.c Ver arquivo

@@ -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,

Carregando…
Cancelar
Salvar