]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[efi] Do not return EFI_NOT_READY from our ReceiveFilters() method
authorMichael Brown <mcb30@ipxe.org>
Tue, 1 Sep 2015 18:20:28 +0000 (19:20 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 1 Sep 2015 20:24:02 +0000 (21:24 +0100)
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>
src/interface/efi/efi_snp.c

index 6712384913e38b29ac8c3cf8c82ad9ab8e30e441..2ff1e974932802b732ffc799c5902abc964e3d4f 100644 (file)
@@ -334,11 +334,13 @@ efi_snp_receive_filters ( EFI_SIMPLE_NETWORK_PROTOCOL *snp, UINT32 enable,
                            snpdev->netdev->ll_protocol->ll_addr_len );
        }
 
-       /* Fail if net device is currently claimed for use by iPXE */
-       if ( efi_snp_claimed )
-               return EFI_NOT_READY;
-
-       /* Lie through our teeth, otherwise MNP refuses to accept us */
+       /* Lie through our teeth, otherwise MNP refuses to accept us.
+        *
+        * Return success even if the SNP device is currently claimed
+        * for use by iPXE, since otherwise Windows Deployment
+        * Services refuses to attempt to receive further packets via
+        * our EFI PXE Base Code protocol.
+        */
        return 0;
 }