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
Unknown Object (File)
Sat, Apr 13, 5:50 PM
Unknown Object (File)
Sat, Apr 13, 12:47 PM
Unknown Object (File)
Dec 22 2023, 11:00 PM
Unknown Object (File)
Dec 18 2023, 2:41 AM
Unknown Object (File)
Dec 13 2023, 8:32 AM
Unknown Object (File)
Dec 12 2023, 11:46 AM
Unknown Object (File)
Nov 29 2023, 5:58 PM
Unknown Object (File)
Sep 27 2023, 3:45 PM
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 18942

Event Timeline

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

sys/netinet/in_pcb.h
127

I just garbage collected this one.

sys/netinet/tcp_usrreq.c
1583

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

Address comments from bz@

sys/netinet/in_pcb.h
127

Great. Thank you.

sys/netinet/tcp_usrreq.c
1583

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.