Page MenuHomeFreeBSD

Add sysctl to use per end point pair TCP timestamp offsets instead of per connection based offsets
ClosedPublic

Authored by tuexen on Jul 17 2019, 6:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Apr 8, 10:17 AM
Unknown Object (File)
Mon, Apr 8, 10:05 AM
Unknown Object (File)
Thu, Mar 28, 8:58 PM
Unknown Object (File)
Mon, Mar 25, 6:58 PM
Unknown Object (File)
Mar 16 2024, 12:48 PM
Unknown Object (File)
Jan 26 2024, 11:34 PM
Unknown Object (File)
Jan 16 2024, 8:44 PM
Unknown Object (File)
Jan 11 2024, 3:30 PM
Subscribers

Details

Summary

r338053 changed the way, the initial TCP timestamp is computed: It is based on the TCP connection (taking both IP addresses and port numbers into account). This is recommended in RFC 7323.

On the freebsd-net mailing list there were reports that this results in problems with some hosts. They can be reproduced by using:

  • curl -v http://88.99.60.171:80
  • curl -v http://163.172.71.252:80
  • curl -v http://5.9.242.150:80
  • curl -v https://vitagramma.com
  • curl -v https://185.134.205.105:443
  • curl -v https://136.243.1.231:443
  • curl -v https://144.76.196.4:443
  • curl -v http://94.127.191.194:80
  • curl -v https://volia.com
  • curl -v https://moemisto.ua
  • curl -v https://fotostrana.ru

By testing it seems:

  • The problem occurs when the server sends a FIN-segment first, which means it ends up in TIMEWAIT.
  • The SYN-segments with smaller TS.val than used before are dropped.
  • The comparison of the TS.val is performed even when the client and server port numbers change. This means that a connections to the ssh server might impact connections to the web server.

Therefore a new sysctl-variable ts_offset_per_conn is introduced which will allow to change the computation to a per host pair offset (taking only the IP addresses into account).

Diff Detail

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