david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[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>
This commit is contained in:
Michael Brown 2015-09-01 19:20:28 +01:00
parent 226d5f2caf
commit 355da7b133
1 changed files with 7 additions and 5 deletions

View 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;
}