Page MenuHomeFreeBSD

Fix IPV6_USE_MIN_MTU socket option for TCP sockets

Authored by tuexen on Aug 18 2018, 11:05 PM.



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

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

tuexen created this revision.Aug 18 2018, 11:05 PM
bz accepted this revision as: bz.Aug 20 2018, 8:12 PM

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

127 ↗(On Diff #46903)

I just garbage collected this one.

1583 ↗(On Diff #46903)

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

tuexen updated this revision to Diff 47001.Aug 20 2018, 9:22 PM

Address comments from bz@

tuexen added inline comments.Aug 20 2018, 9:23 PM
127 ↗(On Diff #46903)

Great. Thank you.

1583 ↗(On Diff #46903)


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