From bf50bad287cba2d2973071f400a196748dee21ab Mon Sep 17 00:00:00 2001 From: TheLastRar Date: Tue, 14 May 2024 02:15:27 +0100 Subject: [PATCH] DEV9: More strictly enforce MTU in pcap --- pcsx2/DEV9/pcap_io.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pcsx2/DEV9/pcap_io.cpp b/pcsx2/DEV9/pcap_io.cpp index 257bc64cb1..2a6d16f167 100644 --- a/pcsx2/DEV9/pcap_io.cpp +++ b/pcsx2/DEV9/pcap_io.cpp @@ -126,7 +126,9 @@ bool PCAPAdapter::recv(NetPacket* pkt) // This delays getting packets we need, so instead loop untill a valid packet, or no packet, is returned from pcap_next_ex. while (pcap_next_ex(hpcap, &header, &pkt_data) > 0) { - if (header->len > sizeof(pkt->buffer)) + // 1514 is the largest etherframe we can get with an MTU of 1500 (assuming no VLAN tagging). + // We don't (typically?) get the FCS, and we might need to strip it if we do. + if (header->len > 1514) { Console.Error("DEV9: Dropped jumbo frame of size: %u", header->len); continue;