]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[legacy] Allocate extra padding in receive buffers
authorMichael Brown <mcb30@ipxe.org>
Tue, 24 Jun 2025 12:40:50 +0000 (13:40 +0100)
committerMichael Brown <mcb30@ipxe.org>
Tue, 24 Jun 2025 12:41:51 +0000 (13:41 +0100)
Allow for legacy drivers that include VLAN tags or CRCs within their
received packets.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/legacy.c

index 73a80194fd661714a3e1766a206a3900b03ff4be..cde8c02d589a1b9c7df9ce52d5192b3078ad1ffe 100644 (file)
@@ -42,7 +42,8 @@ static void legacy_poll ( struct net_device *netdev ) {
        struct nic *nic = netdev->priv;
        struct io_buffer *iobuf;
 
-       iobuf = alloc_iob ( ETH_FRAME_LEN );
+       iobuf = alloc_iob ( ETH_FRAME_LEN + 4 /* possible VLAN */
+                           + 4 /* possible CRC */ );
        if ( ! iobuf )
                return;