From d0c02e0df8ae42b75b422f5df83c600a98d7cbc7 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 24 Jun 2025 13:40:50 +0100 Subject: [PATCH] [legacy] Allocate extra padding in receive buffers Allow for legacy drivers that include VLAN tags or CRCs within their received packets. Signed-off-by: Michael Brown --- src/drivers/net/legacy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/drivers/net/legacy.c b/src/drivers/net/legacy.c index 73a80194f..cde8c02d5 100644 --- a/src/drivers/net/legacy.c +++ b/src/drivers/net/legacy.c @@ -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; -- 2.47.3