From owner-dev-commits-src-branches@freebsd.org Tue Jul 13 18:27:17 2021 Return-Path: Delivered-To: dev-commits-src-branches@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9299B663060; Tue, 13 Jul 2021 18:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GPTd13YC6z4j5v; Tue, 13 Jul 2021 18:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 617A9272A9; Tue, 13 Jul 2021 18:27:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 16DIRHx1050979; Tue, 13 Jul 2021 18:27:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 16DIRHfW050978; Tue, 13 Jul 2021 18:27:17 GMT (envelope-from git) Date: Tue, 13 Jul 2021 18:27:17 GMT Message-Id: <202107131827.16DIRHfW050978@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: c5ba872129b3 - stable/13 - tcp: tolerate missing timestamps MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: c5ba872129b3afee95953294fbe55e014559d408 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-branches@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the stable branches of the FreeBSD src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Jul 2021 18:27:17 -0000 The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=c5ba872129b3afee95953294fbe55e014559d408 commit c5ba872129b3afee95953294fbe55e014559d408 Author: Michael Tuexen AuthorDate: 2021-06-11 18:14:34 +0000 Commit: Michael Tuexen CommitDate: 2021-07-13 18:24:09 +0000 tcp: tolerate missing timestamps Some TCP stacks negotiate TS support, but do not send TS at all or not for keep-alive segments. Since this includes modern widely deployed stacks, tolerate the violation of RFC 7323 per default. Reviewed by: rgrimes, rrs, rscheff Differential Revision: https://reviews.freebsd.org/D30740 Sponsored by: Netflix, Inc. (cherry picked from commit 870af3f4dc57a6bbfc03f6a49ca0d5b7ff1b975a) --- share/man/man4/tcp.4 | 6 ++++-- sys/netinet/tcp_subr.c | 9 ++++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 0b59e2ec801d..86c289c5bec5 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -34,7 +34,7 @@ .\" From: @(#)tcp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd April 24, 2021 +.Dd June 27, 2021 .Dt TCP 4 .Os .Sh NAME @@ -382,7 +382,9 @@ segments belonging to connections for which support of .Tn TCP timestamps has been negotiated. -(default is 0, i.e., the missing of timestamps is not tolerated). +As of June 2021, several TCP stacks are known to violate RFC 7323, including +modern widely deployed ones. +Therefore the default is 1, i.e., the missing of timestamps is tolerated. .It Dv TCPCTL_MSSDFLT .Pq Va mssdflt The default value used for the maximum segment size diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 32a814ac2c4e..c3afb3a1567a 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -268,7 +268,14 @@ SYSCTL_INT(_net_inet_tcp, TCPCTL_DO_RFC1323, rfc1323, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_rfc1323), 0, "Enable rfc1323 (high performance TCP) extensions"); -VNET_DEFINE(int, tcp_tolerate_missing_ts) = 0; +/* + * As of June 2021, several TCP stacks violate RFC 7323 from September 2014. + * Some stacks negotiate TS, but never send them after connection setup. Some + * stacks negotiate TS, but don't send them when sending keep-alive segments. + * These include modern widely deployed TCP stacks. + * Therefore tolerating violations for now... + */ +VNET_DEFINE(int, tcp_tolerate_missing_ts) = 1; SYSCTL_INT(_net_inet_tcp, OID_AUTO, tolerate_missing_ts, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_tolerate_missing_ts), 0, "Tolerate missing TCP timestamps");