Page MenuHomeFreeBSD

Fix some TCP fast open issues
ClosedPublic

Authored by tuexen on Jul 28 2018, 4:35 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Apr 17, 1:56 PM
Unknown Object (File)
Mar 15 2024, 5:00 PM
Unknown Object (File)
Feb 17 2024, 3:01 AM
Unknown Object (File)
Nov 8 2023, 12:26 AM
Unknown Object (File)
Nov 6 2023, 4:09 AM
Unknown Object (File)
Nov 5 2023, 7:34 PM
Unknown Object (File)
Nov 4 2023, 5:02 AM
Unknown Object (File)
Oct 29 2023, 3:35 AM
Subscribers

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 - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

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

Update the comments as suggested by jtl@.

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

You are correct. I updated the comments.

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