mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
DEV9: More strictly enforce MTU in pcap
This commit is contained in:
committed by
lightningterror
parent
7aea867a66
commit
bf50bad287
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user