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)
Mon, Nov 25, 1:24 AM
Unknown Object (File)
Oct 13 2024, 6:39 AM
Unknown Object (File)
Oct 10 2024, 10:18 AM
Unknown Object (File)
Sep 29 2024, 5:29 PM
Unknown Object (File)
Sep 16 2024, 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
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