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
Unknown Object (File)
Fri, Apr 26, 11:02 AM
Unknown Object (File)
Fri, Apr 19, 3:31 PM
Unknown Object (File)
Wed, Apr 10, 6:15 AM
Unknown Object (File)
Feb 19 2024, 9:43 AM
Unknown Object (File)
Dec 10 2023, 12:45 PM
Unknown Object (File)
Dec 1 2023, 9:06 PM
Unknown Object (File)
Nov 25 2023, 1:45 PM
Unknown Object (File)
Nov 25 2023, 9:44 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