Page MenuHomeFreeBSD

Fix some TCP fast open issues
ClosedPublic

Authored by tuexen on Jul 28 2018, 4:35 PM.

Details

Summary

Whenever a TCP server with TCP fast open enabled, calls recv, send, and close before the TCP-ACK segment has been received, the TCP connection is just dropped and the reception of the TCP-ACK segment triggers the sending of a TCP RST segment.

Whenever a TCP server with TCP fast open enabled, calls recv, send, send, and close before the TCP-ACK segment has been received, the first byte provided in the second send call is not transferred.

Whenever a TCP client with TCP fast open enabled calls sendto followed by close the TCP connection was just dropped.

The second problem shows up when using thttpd with fast open enabled and requesting a CGI script.

This patch fixes the above issues.

Test Plan

Run the attached packetdrill scripts. They should pass and all fail without this patch.

Diff Detail

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

Event Timeline

tuexen created this revision.Jul 28 2018, 4:35 PM
jtl accepted this revision.Jul 28 2018, 11:28 PM
jtl added a subscriber: jtl.
jtl added inline comments.
sys/netinet/tcp_output.c
231 ↗(On Diff #45955)

It looks like the comment is now stale.

This revision is now accepted and ready to land.Jul 28 2018, 11:28 PM
tuexen updated this revision to Diff 45981.Jul 29 2018, 7:05 AM

Update the comments as suggested by jtl@.

This revision now requires review to proceed.Jul 29 2018, 7:05 AM
tuexen added inline comments.Jul 29 2018, 7:05 AM
sys/netinet/tcp_output.c
231 ↗(On Diff #45955)

You are correct. I updated the comments.

kbowling accepted this revision.Jul 29 2018, 8:52 AM
This revision is now accepted and ready to land.Jul 29 2018, 8:52 AM
rrs accepted this revision.Jul 30 2018, 10:13 AM
This revision was automatically updated to reflect the committed changes.