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>
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,