From nobody Sun Dec 01 04:56: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 4Y1F510RS6z5gDB6; Sun, 01 Dec 2024 04:56:53 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F506zQRz47v3; Sun, 1 Dec 2024 04:56:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029013; 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=ULAj4SRv7pLkFMmr7QW3hZLCCHBGGMmlOWKXCeKw158=; b=WXZQtRbgB9IgoNl4y6U02AKgHuJUUbo54JyDfGk+Itw0jW0yTjf3DAw0wG+BSNXmzf1mUe hwpP9e1pO1YsL7/X7HBpRVFKvCgqanEl7/KbKiLS+2kV6FkuY4NjSRA8YPjVUDWH+cPXIu og86p+H9GGf32YQOZGjvJbkaazufotKc1A2K0v9MOiaGSry6CCmmWBXmmOZkjwDqsjzYcp moEnlcrscWuKbyKgTC9UalgM4PLOgUZLXPJULRoWDG9DuRBWZxQW5nqj2WtfLVcEy0j8hX uuajpVvz7S6RtB4lz5T+nc6ZPda3AiHO86B/YxUtm8xgElXtW/dq/bT7XNbzuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029013; 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=ULAj4SRv7pLkFMmr7QW3hZLCCHBGGMmlOWKXCeKw158=; b=NEhM4Jn03UeewFqpjtQXcOPGyXkMtrlImwa/g9DAGpnRIsyFI5oBkQlaxpmr4nNv6YJ5OE vc8UYcV7jPJixlgFT2WkTnC5UPYtcriYz9gQLYsKduWy/q1raF+pesLQDk1MKNkK2PNZg4 qnvk9GwivD161iTospcIiBOG4LD4Bb5YR7k93zwZalzzZiDEpjZhSjum/+jK0feo1s1ZgR b1pJvEiObBBczSCSl1n/L9fYmJYiuiH3a9VvXFVAy1nT7+tgk/PL8Lhmh6+wRSR9Co/6af JPhFZgRaEzFkzH9h2TcCh+DWzL8QMojfc2oMIKWlyBVLNT12i/qQrhnzyecREw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029013; a=rsa-sha256; cv=none; b=qZjESaZceUkSXTe4syREVbo3tpWjRYrC9C2i5JE4ymK35fcJTXG9OMbgvUgYsIgNlu1l/f q7oj8FC62YjRMVVZwBpusXhohfnmxHhvTjHWFOBk2FKU8iHdjhlrOTvdFY5T1OTaTAYnyb 46N9B/ZfbeqoNA5qYBxonlPNjzN3rNd2FHeH07a7BCpq6TBZRscN4V5yETNcnXI/AFfykR 391kTZBlNqQFH4EiwS+a0pk5UfsEwmBLcwC8inVgxePmWsN0nkJwsMrLhsAwPNYFjRjdPa NvHsepC5uRuxV1WlZxoU2mBGaZ+4zt3OZXVCsU3vvWtvENezpiEag30p70tBDg== 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 4Y1F506byWzfNd; Sun, 1 Dec 2024 04:56: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 4B14uqVF094327; Sun, 1 Dec 2024 04:56:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14uqWT094324; Sun, 1 Dec 2024 04:56:52 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:56:52 GMT Message-Id: <202412010456.4B14uqWT094324@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 1a264ff0cca7 - stable/14 - tcp_output: Clear FIN if tcp_m_copym truncates output length 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1a264ff0cca786b0cb1fdb5037805db02edcaa20 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=1a264ff0cca786b0cb1fdb5037805db02edcaa20 commit 1a264ff0cca786b0cb1fdb5037805db02edcaa20 Author: John Baldwin AuthorDate: 2024-10-02 19:12:37 +0000 Commit: John Baldwin CommitDate: 2024-12-01 02:46:04 +0000 tcp_output: Clear FIN if tcp_m_copym truncates output length Reviewed by: rscheff, tuexen, gallatin Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D46824 (cherry picked from commit 519981e3c09c2875b136635459c87ab24d3104e2) --- sys/netinet/tcp_output.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index d1a81123ebad..9855083b579a 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1088,13 +1088,18 @@ send: sbsndptr_adv(&so->so_snd, mb, len); m->m_len += len; } else { + int32_t old_len; + if (SEQ_LT(tp->snd_nxt, tp->snd_max)) msb = NULL; else msb = &so->so_snd; + old_len = len; m->m_next = tcp_m_copym(mb, moff, &len, if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb, hw_tls); + if (old_len != len) + flags &= ~TH_FIN; if (len <= (tp->t_maxseg - optlen)) { /* * Must have ran out of mbufs for the copy