From nobody Fri Oct 07 14:56:24 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MkWbY0F8Jz4dvqw; Fri, 7 Oct 2022 14:56:25 +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 4MkWbX6g3Jz3yjD; Fri, 7 Oct 2022 14:56:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665154585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZUu9XvZ/ncc1aDPmLLfvZTQyLy5ICmQK5bSeNYwafo=; b=PMtLjyP990esSjXLJ4h/Q1yS5ARn3hfmzvbGe04iIK7UrO/8l8JMnIoPyaVX4+7KvG6K95 AhRHYBiCFxvPXgpGgIiBFyc7AgwY/b5m6aon486WozZR7mtNFlijyUvEDV5pOFHdTLtdom lXdb+floQXhmgEWbrZVn78HkGvX4uLeZNEQ2ba+710DcCyHwMU5j3gwqSFvUQpfacLkEv2 e0TEvxwUYiXGwVuAU090J3DpI/uYd11+Ju0MjEDUiu1jc43uwhnPMXtR7GbRYqaLvRCkwX 5CB2u8S1WzQOa4t0wG3ISFq49tSZbxpwDfkQkYnnd1Si9vfB3kuWTwK5vXAnSw== 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 4MkWbX5kn5zdRL; Fri, 7 Oct 2022 14:56:24 +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 297EuOdL010621; Fri, 7 Oct 2022 14:56:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 297EuO27010620; Fri, 7 Oct 2022 14:56:24 GMT (envelope-from git) Date: Fri, 7 Oct 2022 14:56:24 GMT Message-Id: <202210071456.297EuO27010620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Richard Scheffenegger Subject: git: 265d0f767ca8 - main - tcp: honor rfc1323 sysctl on passive sessions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 265d0f767ca851650ac40d8a483111d997497a9e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1665154584; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MZUu9XvZ/ncc1aDPmLLfvZTQyLy5ICmQK5bSeNYwafo=; b=ABs66O8yCZuEIi+15UhPoyZdOI3JNVUc1ABLGuqwTBnlx1X0a+6VKsfB+XuxkhbCaEya2J k9iYnaxPVvNKY41IRLRAnndLM0m2SOGleYibX6+bMpKa/olPCVAYR4v3nIUhVIdMdA9BpE lIYsuhfQWE1riOuzWp/yTCevBqWQ8IvYflLA0Eg1WVnRLY25gp8M/6rmi2IJDOW97KVEXx /r28ccs0j9Fa1N4x+EWl9rQ9EfwwuXcWRHD2hhZBIaiZmO4rTUBDaFOkRWdPWQ0hwigYh6 igRv78vU1eU4sHxrE9/Fis5CZCjao53//BwfL+m//Q0Z0zdm6l8GbhopN1B2QQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1665154584; a=rsa-sha256; cv=none; b=v1mHzZ8VIgCHcykCqpSoJtCjqCDWYmdX+eLSslU5A3cVUAFsHLeLz7YdOcqPZ4HXr/MlXA yoQbIIsSaRokYah+ZkDewNZ6NtFTLkCiZqdNxjz6JzEJnvjm2RmSSEkFdPCYVlcmuqGaMi CNE+CCeFchJ0wW9wxmBsObR4miJBqq9ID9hvYc+jdjQ1jqCbfjeRcj+i/ggGuf9eMIVLUB ZEQuDksE1SKMjuvuCKvY6NgK/A0t9k8yMRIRYylokudYh9deEcvs2aLLdYzAkAZ6KD3qZh DzJXjnW9xECexmBENRnpu32tBTAmj2IS5wGPGpFYOc/kes0R4TsUJSO8a91WTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=265d0f767ca851650ac40d8a483111d997497a9e commit 265d0f767ca851650ac40d8a483111d997497a9e Author: Richard Scheffenegger AuthorDate: 2022-10-06 23:43:14 +0000 Commit: Richard Scheffenegger CommitDate: 2022-10-06 23:49:10 +0000 tcp: honor rfc1323 sysctl on passive sessions On passive sessions, honor the local settings disabling or enabling window scaling and timestamp options. Reviewed By: tuexen, #transport Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D36874 --- share/man/man4/tcp.4 | 2 +- sys/netinet/tcp_syncache.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index e6f4ced0c1cf..ba5d57bcf46c 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 August 1, 2022 +.Dd October 7, 2022 .Dt TCP 4 .Os .Sh NAME diff --git a/sys/netinet/tcp_syncache.c b/sys/netinet/tcp_syncache.c index d5380c32391b..2f0e6236f612 100644 --- a/sys/netinet/tcp_syncache.c +++ b/sys/netinet/tcp_syncache.c @@ -1679,12 +1679,12 @@ skip_alloc: * A timestamp received in a SYN makes * it ok to send timestamp requests and replies. */ - if (to->to_flags & TOF_TS) { + if ((to->to_flags & TOF_TS) && (V_tcp_do_rfc1323 != 2)) { sc->sc_tsreflect = to->to_tsval; sc->sc_flags |= SCF_TIMESTAMP; sc->sc_tsoff = tcp_new_ts_offset(inc); } - if (to->to_flags & TOF_SCALE) { + if ((to->to_flags & TOF_SCALE) && (V_tcp_do_rfc1323 != 3)) { int wscale = 0; /*