Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV9: More strictly enforce MTU in pcap #11247

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

TheLastRar
Copy link
Contributor

@TheLastRar TheLastRar commented May 14, 2024

Description of Changes

More strictly enforce MTU of packets received using pcap

Rationale behind Changes

The previous limit was not strict enough, allowing 'small' jumbo frames to be received.
This was causing TLB misses and other issues in some homebrew software, due to what appeared to be a buffer overrun.

Suggested Testing Steps

Test pcap backend on network games and homebrew (that receive large packets).
Testing should be performed in a network that supports an MTU > 1500
Testing in networks that have an MTU == 1500 would be useful to ensure we aren't too strict.

I currently assume that libpcap dosn't capture the etherframe FCS
This might not be the case on FreeBSD or MacOSX, as libpcap, so specific testing there would needed.

@github-actions github-actions bot added the DEV9 label May 14, 2024
@TheLastRar TheLastRar force-pushed the DEV9-pcap-mtu branch 3 times, most recently from 0f29f86 to 01b4ee0 Compare May 18, 2024 22:19
@TheLastRar
Copy link
Contributor Author

Added code to account for the Ethernet frame sequence check.
Some adapters (can be configured to) allow this field to be captured,
The PS2 SDK, appears to expect this field to be trimmed (or else it would overflow their buffer), so we have to do the same.

@TheLastRar TheLastRar marked this pull request as ready for review May 18, 2024 22:26
@TheLastRar TheLastRar force-pushed the DEV9-pcap-mtu branch 3 times, most recently from 97aff5a to 14c23cb Compare May 18, 2024 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant