From nobody Sun Dec 01 04:57:42 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 4Y1F5z1cvPz5gDQ1; Sun, 01 Dec 2024 04:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Y1F5z07Kqz4BrG; Sun, 1 Dec 2024 04:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029063; 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=vqqdz5NxiXMIgYGB/mm4jouQkdndFTq3MDbnGDzo9sM=; b=i0aFYdMu4nkzQKd0NPPyKRo4k0DpZITCgjjYBUa6k/+tWFOJizuSuo6bMnCJKASK/NOdyy Vjn4j6YhlJGbjmYvdwIxGB4h3PglTPkcNIQwES/U24pyRgjirzu+nD/qUuCILBkGj6qG89 mjfrZXH9mQmtJTwEwaZ2MXNmz0ghi+cuQsduW3pVX6WvF/3VDpxSaUQLWN8TToxeOx6fGz jHWmS2ifj/KbcwmCVTAGZo+jO1u0HfGb/JBg5TrTyybnkHks1WBJxqiEKsJajmYjNJ8GsX MUPAMwNnG58zjnWSq1bmlRZwZGXzz6TSX3860+MpnrIGU1SvWSstGyzg76p8+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1733029063; 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=vqqdz5NxiXMIgYGB/mm4jouQkdndFTq3MDbnGDzo9sM=; b=sfU38i3ULeCYYrhJ6Ouvp67s3LMCBH8D7s/PiwbqPQILRy0kYw8by2cdhlKnTGUcVqmNxe iGZG5uHr3l1v/ZZhIvDYLTDFqrlvrgxLGfNTxrJx9JhUgxDaqncaEPmLUNVAO3WYEPEAtc viHPDIA1O3JQsLB0Yb9+mfLy9VLGbpEehULKevikuEnNOEz09+no1QytDpA4Ud28pFqbqD A3q37k+4IasUyl5K2V2o4HY0mUQBJ7VbdM14zV9u8KKbsSGBTVbdq1yI5+HiGr/0DOA6Ui 3R/xKuHtD0tYGSkYDURJXDrvGemg3E1vwW39hbnb3AOFSbejRv/4XXCa6OnB/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1733029063; a=rsa-sha256; cv=none; b=ZobAfcpn+c1+hnc3AbOHlGb8pW2+HKjbAZt64KrIB2MSVW60P1Po+0EugohRkkztPWKdxe yjTQfxcXyCzGNBp0R2VabWDCVcafiVyV0W+FMfiQH2k0QHNiemFh4EaQpBhnpBTU9o8+Pt xa44OmqNl0WC9jURjzWpUurDWzrs5NgAhwgB8bIBuUxIOaCx/TnyuQjYI6xHFDObbX+HBK xpZ6HG6POqD65lFp+oXiRF0wru3HZTFhKdk8pDPPId905OV240l/doQvE0g7WfF7WSlAMb wvO0rY+D/bcHHIIihazXe07kek4mZEtImwZVJZTl3Wv12iMvL1pH0O2I5eAfvg== 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 4Y1F5y6sKYzfNh; Sun, 1 Dec 2024 04:57:42 +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 4B14vgr0096730; Sun, 1 Dec 2024 04:57:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4B14vg4L096727; Sun, 1 Dec 2024 04:57:42 GMT (envelope-from git) Date: Sun, 1 Dec 2024 04:57:42 GMT Message-Id: <202412010457.4B14vg4L096727@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: 05d81feb50d4 - stable/13 - 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/13 X-Git-Reftype: branch X-Git-Commit: 05d81feb50d4a757ccdff644b49195ddb5e72a56 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=05d81feb50d4a757ccdff644b49195ddb5e72a56 commit 05d81feb50d4a757ccdff644b49195ddb5e72a56 Author: John Baldwin AuthorDate: 2024-10-02 19:12:37 +0000 Commit: John Baldwin CommitDate: 2024-11-30 21:29:20 +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 d95174e53789..076562938d74 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1092,13 +1092,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