Page MenuHomeFreeBSD

Use updated TCP timestamps when retransmitting SYN-ACK using the syncache code path
ClosedPublic

Authored by tuexen on May 31 2018, 12:12 PM.
Tags
None
Referenced Files
F99519269: D15634.diff
Thu, Oct 10, 10:18 AM
Unknown Object (File)
Sun, Sep 29, 5:29 PM
Unknown Object (File)
Mon, Sep 16, 8:35 PM
Unknown Object (File)
Sep 10 2024, 3:46 AM
Unknown Object (File)
Sep 8 2024, 9:12 PM
Unknown Object (File)
Sep 7 2024, 6:10 PM
Unknown Object (File)
Aug 21 2024, 12:45 PM
Unknown Object (File)
Aug 13 2024, 5:03 AM
Subscribers

Details

Summary

FreeBSD currently reuses the TCP timestamp used in the transmission of a SYN-ACK segment when sending retransmissions. However, this only happens if done via the syncache code. The timestamp is not kept constant when retransmitting SYN segments or retransmitting the SYN-ACK from the generic code. FreeBSD also validates when receiving the ACK (third message of the handshake) that the timestamp was used.

This is inconsistent and also does not follow the specification. Other implementations (Mac OS X, Linux and Solaris) also do not show this behaviour.

Therefore, this patch changes the behaviour to consistently use an up to date timestamp also on SYN-ACK retransmissions.

Test Plan

Run the following packetdrill test scripts one time using sysctl -w net.inet.tcp.syncookies=1 and one time using sysctl -w net.inet.tcp.syncookies=0:

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable