瀏覽代碼

[efi] Do not return EFI_NOT_READY from our ReceiveFilters() method

Our SNP ReceiveFilters() method is a no-op, since we always (if
possible) use promiscuous mode for all network cards.  The method
currently returns EFI_NOT_READY if the SNP interfaces are claimed for
use by iPXE, as with all other SNP methods.

The WDS bootstrap wdsmgfw.efi attempts to use both the PXE Base Code
protocol and the Simple Network Protocol simultaneously.  This is
fundamentally broken, since use of the PXE Base Code protocol requires
us to disable the use of SNP (by claiming the interfaces for use by
iPXE), otherwise MnpDxe swallows all of the received packets before
our PXE Base Code's UdpRead() method is able to return them.

The root cause of this problem is that, as with BIOS PXE, the network
booting portions of the UEFI specification are less of a specification
and more of an application note sketchily describing how the original
hacked-together Intel implementation works.  No sane design would ever
have included the UdpWrite() and UdpRead() methods.

Work around these fundamental conceptual flaws by unconditionally
returning success from efi_snp_receive_filters().

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 8 年之前
父節點
當前提交
355da7b133
共有 1 個檔案被更改,包括 7 行新增5 行删除
  1. 7
    5
      src/interface/efi/efi_snp.c

+ 7
- 5
src/interface/efi/efi_snp.c 查看文件

@@ -334,11 +334,13 @@ efi_snp_receive_filters ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, UINT32 enable,
334 334
 			    snpdev->netdev->ll_protocol->ll_addr_len );
335 335
 	}
336 336
 
337
-	/* Fail if net device is currently claimed for use by iPXE */
338
-	if ( efi_snp_claimed )
339
-		return EFI_NOT_READY;
340
-
341
-	/* Lie through our teeth, otherwise MNP refuses to accept us */
337
+	/* Lie through our teeth, otherwise MNP refuses to accept us.
338
+	 *
339
+	 * Return success even if the SNP device is currently claimed
340
+	 * for use by iPXE, since otherwise Windows Deployment
341
+	 * Services refuses to attempt to receive further packets via
342
+	 * our EFI PXE Base Code protocol.
343
+	 */
342 344
 	return 0;
343 345
 }
344 346
 

Loading…
取消
儲存