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
F150449417: D15634.diff
Wed, Apr 1, 7:32 AM
Unknown Object (File)
Sat, Mar 28, 10:37 AM
Unknown Object (File)
Tue, Mar 24, 12:26 AM
Unknown Object (File)
Sun, Mar 22, 4:46 AM
Unknown Object (File)
Fri, Mar 20, 8:18 PM
Unknown Object (File)
Fri, Mar 20, 6:02 AM
Unknown Object (File)
Wed, Mar 18, 4:40 PM
Unknown Object (File)
Mon, Mar 2, 3:39 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 Skipped
Unit
Tests Skipped
Build Status
Buildable 16945