From nobody Thu Aug 01 20:24:52 2024 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 4WZgS45L1qz5RPMy; Thu, 01 Aug 2024 20:24:52 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WZgS44l81z4JRB; Thu, 1 Aug 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543892; 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=TvjOHRxTNj3WC31n3rXPb2d3efGu+WImTFaVP0M8xvg=; b=l9pzAdjq8jpcIR9TZ1P44k4P0WE7LYJ/hTSPe9685KsQu3NmrdSWL8YP00+aK744WAQ7er ICGSUGmkokQHmJC3mpP9rP83cQHAvqt7m6UAhbISeLwUZPj+m2B3pZEIYf3z5TMZUCDaRt fuVqSsVKY306Z4nSUBvsrG8ui/HXPJER4uy71JMvw8tb42cI5sFWwNfilDetdbJ0v0flXk vN/kicI1/nSwl5BnwudNMLE4M6QYknVM9Ylj7RTMlzZB7x0LakWyl26KQkP9gsShlcUUu4 JKveKHeMQhD0gZKK/qLX66cOr9KhmOEk2cx449UVn3zID3f8r9CZ34cQ4sppqg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722543892; a=rsa-sha256; cv=none; b=hojjk7bacX92y+Eam14oMeaoQYd3N4nMO2w3vzFtHmWJmXlnJU2J7+yuiIq2R94U0uo7XE 27ITPKMKeTRq4qgL7LnuYcSDB+N8H5XmT9HUr/0IHuzLYxqWnnoA9OrjkJeQks0BBr4Tbd 32Eakq2Jj6AiB635/Ms9jqL3ttqD7UUM/7tJWGeYLCrHzqvOmED6g0fir/F6Q9ZVoek+CP DV6JQqIgcfeWNXPcHHF7LmA+d6/MQLM33nkecEuyU9exy9JCtHjvjxPP3AS0J98Yko8vkM 7GGq4kjJANjaFFiaKrzuhWbHZxt4+j0XlBteqtmQ7dLqeBalw3cD4bPDvu7ycg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722543892; 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=TvjOHRxTNj3WC31n3rXPb2d3efGu+WImTFaVP0M8xvg=; b=drNIasiJbdrsRUnD//HOpRJtDTyc1w06m6aYtqXxV9uDBXsEbd2xeJG2eG6ATWjVi6C3NU iw4YAz2iByrEtBhBB9kSbwn6VxvcLyYa0pFfl5Q2rHMtUZ6P9zhL3TZMDOExvWmY69HSqf HK7rgLMJg9fzaBMny1NUEAJ/bOLbhQQ0s8FdeAGFHf4z4xQdD+CLI41hcg2qcSzdFBkX6t NEmcO0ZpHHWUDllNfJvPG+dtAbRhMDvCAw4aOgv0Vf8Khym7dG+Kj682E7pEaB8cxVT0o5 G9qD+YtNF35zCeY+Jct1cyc+G+m0e+olBSIcZIplnY87TrKlyjFweL6/d8rGZg== 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 4WZgS44KvTz10G2; Thu, 1 Aug 2024 20:24:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 471KOqD2020455; Thu, 1 Aug 2024 20:24:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 471KOq5k020451; Thu, 1 Aug 2024 20:24:52 GMT (envelope-from git) Date: Thu, 1 Aug 2024 20:24:52 GMT Message-Id: <202408012024.471KOq5k020451@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: 2290185085ee - stable/13 - tcp: no data on SYN segments unless doing TFO 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org 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: 2290185085eecbaecefa70cc9b3769b7518c9bb2 Auto-Submitted: auto-generated The branch stable/13 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2290185085eecbaecefa70cc9b3769b7518c9bb2 commit 2290185085eecbaecefa70cc9b3769b7518c9bb2 Author: Michael Tuexen AuthorDate: 2024-03-22 10:12:56 +0000 Commit: Michael Tuexen CommitDate: 2024-08-01 20:24:18 +0000 tcp: no data on SYN segments unless doing TFO Ensure that there is no data on SYN segments unless doing TFO. This check is already in RACK and BBR. Reported by: glebius Reviewed by: rscheff Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44384 (cherry picked from commit af700f430fd86ba3eae63e587985a12436db8f69) --- sys/netinet/tcp_output.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index ba559500552b..d95174e53789 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -482,6 +482,12 @@ after_sack_rexmit: (tp->t_tfo_client_cookie_len == 0)) || (flags & TH_RST))) len = 0; + + /* Without fast-open there should never be data sent on a SYN. */ + if ((flags & TH_SYN) && !(tp->t_flags & TF_FASTOPEN)) { + len = 0; + } + if (len <= 0) { /* * If FIN has been sent but not acked,