Page MenuHomeFreeBSD

if_epair: do not transmit packets that exceed the interface MTU
ClosedPublic

Authored by kp on Jun 2 2023, 7:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 16, 8:47 PM
Unknown Object (File)
Tue, Apr 16, 5:51 AM
Unknown Object (File)
Feb 9 2024, 4:24 AM
Unknown Object (File)
Feb 9 2024, 4:24 AM
Unknown Object (File)
Feb 9 2024, 4:23 AM
Unknown Object (File)
Feb 9 2024, 4:23 AM
Unknown Object (File)
Feb 9 2024, 4:11 AM
Unknown Object (File)
Dec 20 2023, 6:06 AM

Details

Summary

While if_epair has no issues doing this we should drop those packets
anyway, because it improves the fidelity of the automated tests.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Jun 2 2023, 7:29 PM

What is the default MTU for epair these days?

sys/net/if_epair.c
339

Probably wants more vertical space for that comment /*\n...\n*/ ?

In D40397#919783, @bz wrote:

What is the default MTU for epair these days?

We ether_ifattach(), which defaults to ETHERMTU, 1500.

if_epair doesn't need to care, of course, but the lack of this validation actually prevents the test in D40396 (fix for that problem is D40395) from failing when it should.
SIOCSIFMTU still works, and and will let users set whatever.

  • reformat comment block
This revision was not accepted when it landed; it landed in state Needs Review.Jun 6 2023, 8:53 AM
This revision was automatically updated to reflect the committed changes.