summaryrefslogtreecommitdiffstats
path: root/src/interface/efi/efi_snp.c
diff options
context:
space:
mode:
authorMichael Brown2015-09-01 20:20:28 +0200
committerMichael Brown2015-09-01 22:24:02 +0200
commit355da7b1336114564ce442b7d9bc4485f86d0be5 (patch)
tree7c2800d39c160e65b81511a374029b6ff5af8289 /src/interface/efi/efi_snp.c
parent[efi] Fix order of events on SNP removal path (diff)
downloadipxe-355da7b1336114564ce442b7d9bc4485f86d0be5.tar.gz
ipxe-355da7b1336114564ce442b7d9bc4485f86d0be5.tar.xz
ipxe-355da7b1336114564ce442b7d9bc4485f86d0be5.zip
[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>
Diffstat (limited to 'src/interface/efi/efi_snp.c')
-rw-r--r--src/interface/efi/efi_snp.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/interface/efi/efi_snp.c b/src/interface/efi/efi_snp.c
index 67123849..2ff1e974 100644
--- a/src/interface/efi/efi_snp.c
+++ b/src/interface/efi/efi_snp.c
@@ -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;
}