aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2020-11-15 23:17:17 +0000
committerMichael Brown <mcb30@ipxe.org>2020-11-15 23:17:17 +0000
commit83b8c0e21165d006b877ecfed6fade903b72c402 (patch)
tree470afe68510a3dffdde777a0717c4fa31c85906e
parent5439329c9964eca519017d1c550deb55e0746893 (diff)
downloadipxe-83b8c0e21165d006b877ecfed6fade903b72c402.tar.gz
[efi] Do not populate media header length in PXE transmit CPB
The UEFI specification defines PXE_CPB_TRANSMIT.DataLen as excluding the length of the media header. iPXE currently fills in DataLen as the whole frame length (including the media header), along with placing the media header length separately in MediaheaderLen. On some UNDI implementations (observed using a VMware ESXi 7.0b virtual machine), this causes transmitted packets to include 14 bytes of trailing garbage. Match the behaviour of the EDK2 SnpDxe driver, which fills in DataLen as the whole frame length (including the media header) and leaves MediaheaderLen as zero. This behaviour also violates the UEFI specification, but is likely to work in practice since EDK2 is the reference implementation. Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r--src/drivers/net/efi/nii.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/drivers/net/efi/nii.c b/src/drivers/net/efi/nii.c
index e76e211c1..8f4fbee18 100644
--- a/src/drivers/net/efi/nii.c
+++ b/src/drivers/net/efi/nii.c
@@ -977,7 +977,6 @@ static int nii_transmit ( struct net_device *netdev,
memset ( &cpb, 0, sizeof ( cpb ) );
cpb.FrameAddr = virt_to_bus ( iobuf->data );
cpb.DataLen = iob_len ( iobuf );
- cpb.MediaheaderLen = netdev->ll_protocol->ll_header_len;
/* Transmit packet */
op = NII_OP ( PXE_OPCODE_TRANSMIT,