[undi] Pad transmit buffer length to work around vendor driver bugs

The workaround used for UEFI in commit 926816c ("[efi] Pad transmit
buffer length to work around vendor driver bugs") is also applicable
to the BIOS UNDI driver.

Apply the same workaround of padding the transmit I/O buffers to the
minimum Ethernet frame length before passing them to the underlying
UNDI driver's transmit function.

Reported-by: Alexander Patrakov <patrakov@gmail.com>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
Michael Brown
2026-04-07 00:37:00 +01:00
parent 5e06c866a0
commit 6d82975059
+6
View File
@@ -493,6 +493,12 @@ static int undinet_transmit ( struct net_device *netdev,
* transmit the next packet.
*/
/* Pad to minimum Ethernet length, to work around underlying
* drivers that do not correctly handle frame padding
* themselves.
*/
iob_pad ( iobuf, ETH_ZLEN );
/* Some PXE stacks are unable to cope with P_UNKNOWN, and will
* always try to prepend a link-layer header. Work around
* these stacks by stripping the existing link-layer header