From nobody Wed Oct 02 19:13:34 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 4XJkxB4rGRz5XxYM; Wed, 02 Oct 2024 19:13:34 +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 4XJkxB4BNvz4Srt; Wed, 2 Oct 2024 19:13:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727896414; 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=w0bGZ9gnvEfaA75VJTEQH7/6wp1MA69Dj3fYYdLqUYQ=; b=Kwsl3B70ldU/mqtnLEoaDo91B7L25uvBgXgOQxa+SmpuyaMWPkoMxRcMOAB2rF1aMxVEPf dRNyERv2cQDR6pBaFjwSsfbmklG2HsPUBSS//WZ8RA0T5uLBtUVbpyIfHh6bTq8pZ8T1FA SBwuFx2nBRMTIBO9KImuAqmBdJTvC3lk5jvVtZ8DW6JyzXygLAY4zyRU2HG2BqeDI2rrAi DBTLrPRriDHDBmpQjkzib7Xa1FJWrwMozGsZRhs9skG6CFsTBxfPZW5Tt4qzs+47cnATLS de660iM/EEhMY8W8taaIAeOksSUjlwr324JOBWUwGTR8rZ20GBelQCzUIaQX9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1727896414; 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=w0bGZ9gnvEfaA75VJTEQH7/6wp1MA69Dj3fYYdLqUYQ=; b=KtiC1WIpPDrfX3Cv+v2KsriZ7pJCqi/RNTZngcu+jfuiB1VY2FmtBj33TNYhkGGaVsyAdG UsBE9YaxifM03GEzzrvjDZt5rHK+D6Ij/Wn6hMBUceNHvQMATUcAj6Xc0IRhbGlJzUySps /RogH9wl3gGqpXrsbvjZiykI0tKGl0QrZxcmdMnxLpi6CbNsc7aIzQAgbGfvSumYWvLjdm Um9MjJTQXZqfLfzzHXfRl+XdaZ2TufpgIAuAwhotN7SVjclPUWscU3VdhtaNuSqTRojNbG 8TK6hBuOrAHhuqvRS7XAa6IW4cdcPH2hYiL+LDM7MV9Xd1yYgidkEz4YbLu3sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1727896414; a=rsa-sha256; cv=none; b=X8M1Ha2zTmS3zMyuU7omWQY99L/TOjVE7UJRG7kAenxpySoPLgvWO9QaViZMBJBLW+T8Z1 bN4TcldL9FWg71LLJOqXmsT8hYKpDoLLvsL/NnSPH3c3Fn6vibmyrrtwV1JeciGlTwKoI+ C0uoTrpYGz8GLeUTAXUwjk1G9f9pEhovRa3MpGSTke6XMoxYsr+lDIcUiJ90ZktOxNVK8L O+96KxFXVTKiogTD5OfTn+LxbMLLHGmHforlO780TdrkM/feQrcHkaH83IHOqbP6NOFPN7 zeOqeHsO/DcjvsKITTIoTnWAE5zQNXG0MZuSzRT6Ineo6JLPux4lQmOm2WsHYA== 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 4XJkxB3nlZzJFS; Wed, 2 Oct 2024 19:13:34 +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 492JDYeZ092514; Wed, 2 Oct 2024 19:13:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 492JDY5j092511; Wed, 2 Oct 2024 19:13:34 GMT (envelope-from git) Date: Wed, 2 Oct 2024 19:13:34 GMT Message-Id: <202410021913.492JDY5j092511@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 519981e3c09c - main - tcp_output: Clear FIN if tcp_m_copym truncates output length 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 519981e3c09c2875b136635459c87ab24d3104e2 Auto-Submitted: auto-generated The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=519981e3c09c2875b136635459c87ab24d3104e2 commit 519981e3c09c2875b136635459c87ab24d3104e2 Author: John Baldwin AuthorDate: 2024-10-02 19:12:37 +0000 Commit: John Baldwin CommitDate: 2024-10-02 19:12:37 +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 --- 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 fe1f15c26338..78ecfe5289b6 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1078,13 +1078,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