From nobody Thu Jan 11 00:41:27 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 4T9QpJ1hH8z56bvS; Thu, 11 Jan 2024 00:41:28 +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 4T9QpH5v15z4JLv; Thu, 11 Jan 2024 00:41:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933687; 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=C1SBthQKoX3KQkncNs3ffTUt3Tu0nmzAhP3Jsteb+6Y=; b=Kl88IZsI+0wh+IPzTaCG61LEy3wkC+uX7OCunW2QEfC+MJs2x3vcupEkKLcucJGoM7TB8G 0JmZ2MyhAUTaJwyCNN1Yp2l9wT7yxNuJXecRAiJFc932YVOfyJ7jC1emh2jRXsDZE0IebU sRyaR6czkpUSD0JRjyB/cuMm1iW35+wrXESyhsWpWrRrXVqxqnfXwA6/l/HY/yYFfX7IgI BPFsHe+foxfSWIcoInPS1Bv2McZD/3wLZXGEwlgmRJr6p3TQ9F5A8PCE0TI5XxdqoRBxgl izhupKRH0migufWmgbbKWQmMOo3A9TnYIJMSDCoxjAcGX4UxdVAkzXtliZZ0/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1704933687; 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=C1SBthQKoX3KQkncNs3ffTUt3Tu0nmzAhP3Jsteb+6Y=; b=p1ubTFK4D1NikqJG98gl7c8GEbBd7LMF0m7ITB8WNM2m0SA1wDHK1GJwjS/Jbr767SNoJ/ 8ypaC976203o/AS4h8Jxwjk6gufbP6ZePmoslZJAYsE9TABmLYB4exDBfUytr18MyETfNa 3niMXUpF1Q0fZAJy+iHMGrnthhB71j4QxPWj6oUJp3G/f4xtNcZtEsB1fcoP47QtRrQjmh YkhMkbtbaFL7EBKG4RiHzpv+RFUC37US+QJAdOEFqkkouWJgaBI9+bN0hnc0ZLD31Iypzt xKDZGnlW5lkw/WFB+JC/S9g/dBwfLnFJKhDQXtQVt/qt+kD/HNt5r+sTX5i3gg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1704933687; a=rsa-sha256; cv=none; b=nOJsk9ffEoOjxgey/swU2KdSyiiOcanJLhjsbNBvlblj599rmFAiDIFpugVY6g3YYpbvKE BBLvNxYUPIGAQOVZzq+tj0xuYfTLZeyjhLzU0hvQkBhIJmlIV7p7kOCZwVcc/u8ctoomYp woDBfPujMyEycvFbGt5EIK9XDvXL7XBI2qNcuSIvM8bFROeaQeS1MHglM5wj4eHUFzN5iR AR4LVI62oqDbanwPuY0nd2xVkGK5r8phGkwugLDaYrGWrADp+rqq0yvmDGuz1vpnlulZcc KCzkJ0FseGfA3ZbYfrkRuIJlXHhxTrD57yQY7EWAWnh7E2BbnmvelfLscLM1rA== 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 4T9QpH4zz5zxBg; Thu, 11 Jan 2024 00:41:27 +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 40B0fR9w013173; Thu, 11 Jan 2024 00:41:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40B0fRTx013170; Thu, 11 Jan 2024 00:41:27 GMT (envelope-from git) Date: Thu, 11 Jan 2024 00:41:27 GMT Message-Id: <202401110041.40B0fRTx013170@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Richard Scheffenegger Subject: git: d730ffcd6ad3 - stable/13 - tcp: Undo the consumption of sequence space by FIN in case of a transient error. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rscheff X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: d730ffcd6ad3da47d9a1af00a534a78861280f54 Auto-Submitted: auto-generated The branch stable/13 has been updated by rscheff: URL: https://cgit.FreeBSD.org/src/commit/?id=d730ffcd6ad3da47d9a1af00a534a78861280f54 commit d730ffcd6ad3da47d9a1af00a534a78861280f54 Author: Richard Scheffenegger AuthorDate: 2022-07-14 00:49:10 +0000 Commit: Richard Scheffenegger CommitDate: 2024-01-11 00:38:36 +0000 tcp: Undo the consumption of sequence space by FIN in case of a transient error. If an error occurs while processing a TCP segment with some data and the FIN flag, the back out of the sequence number advance does not take into account the increase by 1 due to the FIN flag. Reviewed By: jch, gnn, #transport, tuexen Sponsored by: NetApp, Inc. Differential Revision: https://reviews.freebsd.org/D2970 (cherry picked from commit 66605ff791b12a2c3bb4570379db0e14d29fca4c) --- sys/netinet/tcp_output.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sys/netinet/tcp_output.c b/sys/netinet/tcp_output.c index 3ed4d34fd061..3e1a2320f331 100644 --- a/sys/netinet/tcp_output.c +++ b/sys/netinet/tcp_output.c @@ -1684,8 +1684,13 @@ timer: tp->sackhint.sack_bytes_rexmit -= len; KASSERT(tp->sackhint.sack_bytes_rexmit >= 0, ("sackhint bytes rtx >= 0")); - } else + KASSERT((flags & TH_FIN) == 0, + ("error while FIN with SACK rxmit")); + } else { tp->snd_nxt -= len; + if (flags & TH_FIN) + tp->snd_nxt--; + } } SOCKBUF_UNLOCK_ASSERT(&so->so_snd); /* Check gotos. */ switch (error) {