Page MenuHomeFreeBSD

Fix IPV6_USE_MIN_MTU socket option for TCP sockets
ClosedPublic

Authored by tuexen on Aug 18 2018, 11:05 PM.
Tags
None
Referenced Files
F103558335: D16796.diff
Tue, Nov 26, 12:29 PM
Unknown Object (File)
Sep 25 2024, 4:24 PM
Unknown Object (File)
Sep 13 2024, 7:40 PM
Unknown Object (File)
Aug 30 2024, 2:18 AM
Unknown Object (File)
Aug 30 2024, 2:18 AM
Unknown Object (File)
Aug 30 2024, 2:18 AM
Unknown Object (File)
Aug 30 2024, 2:18 AM
Unknown Object (File)
Aug 30 2024, 2:05 AM
Subscribers

Details

Summary

Is reported in PR173444 that using the IPV6_USE_MIN_MTU socket option on a TCP socket results in sending fragmented IPv6 packets.

The patch adds another flag to the in_conninfo flags. bz@ suggested in BSDCam to avoid this by passing the inp around, but this is not always available (from within the syncache code). Therefore, the TCP layer intercepts the IPPROTO_IPV6 level socket option, reduces the MSS or TCP connections when possible and marks them.

Although setting the socket option means that the application want to limit the size of TCP segments being sent, a value of 1220 is announced in the MSS option, if possible, since TCP usually is very conservative.

Test Plan

Run the following packetdrill scripts:

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 18989

Event Timeline

I think it looks good; given you've done the testing.

sys/netinet/in_pcb.h
126–127

I just garbage collected this one.

sys/netinet/tcp_usrreq.c
1587

Do you want to add a comment here why you are doing this?

Address comments from bz@

sys/netinet/in_pcb.h
126–127

Great. Thank you.

sys/netinet/tcp_usrreq.c
1587

Done.

This revision is now accepted and ready to land.Aug 20 2018, 9:41 PM
This revision was automatically updated to reflect the committed changes.