From nobody Fri Mar 22 10:18:43 2024 X-Original-To: dev-commits-src-main@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 4V1JFb5tjGz5DXJg; Fri, 22 Mar 2024 10:18:43 +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 4V1JFb5MPGz4ghw; Fri, 22 Mar 2024 10:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711102723; 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=1cTnAsPdBydcpzlmVQ8t9rBImi9S1Gwj2T5329ItIR4=; b=taoQaVVFznbI0vB9AAul4yrf/Dms2rd54X8PqJYXBvM54utyE3XqpF4TFbtbjEeJpg5FWc Ss0mccmHpW2WaTWzMYDLCzY5sW/vqz1j2fCoOSUCz/Mi9d+JmAfv2zjLSoe8m8uxfYxdxf 4KL4Y4aq/8PM3xvBxNMEyZ8j0vJ0XPvJzChQUNlCusttj5I/zwgcENbiFzE+WrpYTYJyYi pw6pMGN3l9fNlX/9+8+JM0LiJjGBezlSEIk4gYHC9alyyW0cqlCUJfBR+eDrDwfjhsWn6n V9kBp0+1c1hGn2inM2DChiUc31K6cJn38B/fQs9vIVtOooWkSBTmGQHZnZ4Wmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711102723; a=rsa-sha256; cv=none; b=CVAXOnBWwr5PY03ZJo2VjNl+7fBHb16I82a9+zt++/EsswDIE/2cnQwbW5CZ4o5AHRpm8S HDhRep75T1U+PuHF5a9EdkBlaDcs+qQhLDGe6aCY9mGd5C60liP2FyvuLkWBzvsyTTLVNV 8gFVngpH0VXRqqxjBRKXRCZ2Sy7Cotmj22hS14d7u4Y5tbrnA02iRLLooHC132y35mEAsH WPni88H49zNHwIagrQwd4elCrng96Shihc3g2bQm/H/dLhv40DYzRuendE8y6a7VpB1dkV ArhZmKm7l5YcKt7a/qr659OUZKvPNDHcA+Vyjd02e1dqXMw7TyEkd6B6hd7yLg== 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=1711102723; 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=1cTnAsPdBydcpzlmVQ8t9rBImi9S1Gwj2T5329ItIR4=; b=lhzRvfNSak0kMQ1YuLP0RAzH8vdbN7TR3GqOowVS3Ty2zOsZblG1+yZKuYM4DHubd0mHrE /YJbSz6UbKWwVFJFe2cT0HJnATNo9pHfc/DvruZdmaRcWHfYa1h3pHzCxyrjiAcQwbRHz7 R3GoiJwJetMCLBi74QNToWnhCFcYHP3dmOIYPsQIlo6NTsSdPY/HnF/FBMwi0or6vZuTaV wd5a774btcqrzLiJJ/WBczcEuA6EHzKdOvvYy94aEGZdJ7LuwcNUYhZBbgo5l19kXTBg/R kwH/pX/h2Xq3IJfGNGpZh5WbcrP6yLEpeGYLrsJmxTg63CKxXpz2s3mGsewOAQ== 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 4V1JFb4rNHz1DY6; Fri, 22 Mar 2024 10:18:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42MAIhCn064290; Fri, 22 Mar 2024 10:18:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42MAIhfr064287; Fri, 22 Mar 2024 10:18:43 GMT (envelope-from git) Date: Fri, 22 Mar 2024 10:18:43 GMT Message-Id: <202403221018.42MAIhfr064287@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: af700f430fd8 - main - tcp: no data on SYN segments unless doing TFO List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: af700f430fd86ba3eae63e587985a12436db8f69 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=af700f430fd86ba3eae63e587985a12436db8f69 commit af700f430fd86ba3eae63e587985a12436db8f69 Author: Michael Tuexen AuthorDate: 2024-03-22 10:12:56 +0000 Commit: Michael Tuexen CommitDate: 2024-03-22 10:12:56 +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 MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D44384 --- 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 6f7bf6f8b029..2bbc9414197c 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -470,6 +470,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,