mirror of https://github.com/PCSX2/pcsx2.git
DEV9: More strictly enforce MTU in pcap
This commit is contained in:
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.
|
// 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)
|
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);
|
Console.Error("DEV9: Dropped jumbo frame of size: %u", header->len);
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue