From nobody Mon Oct 31 15:33:40 2022 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 4N1HHT279nz4gVld; Mon, 31 Oct 2022 15:33:41 +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 4N1HHT1Z97z3VKV; Mon, 31 Oct 2022 15:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667230421; 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=ewJJ2ALT659kXcps9dh3k2oJJ6hIdBxXhp11+WfcarE=; b=Nw85J4/KvI7bNR6qGmE6Or2SDvD8sOnlDRvumLdjhy1FRKBTMi/3ltPWM3FzQE0/E3Ky9q FT3No7Iyy+oP2WdhseBtWn1SMXEfpjGlmOzazZ0aXJ5E0Ur8HQ2pM8UTyMF0l3Z9Hb6nwK PLB+yzB5onxC72RKHs+9wE6lGONhjzuWwTcOuESvUhsG1X31MyoJD8ZeIH+Ed5CSMch7wi fU6uR9zVIY8GcluogrGzJW4YsJ/rDra0dhhONLfcgaeDRJhYN7RJqGI6OVkp1MRuKL1wYr fBDZOBw2XHU7JgZal14wCR6zXsBVoO05z1agHmZZy53rBOv+0INF9ObbJKKBuA== 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 4N1HHT0bZwzhSd; Mon, 31 Oct 2022 15:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29VFXe9D060947; Mon, 31 Oct 2022 15:33:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29VFXemY060946; Mon, 31 Oct 2022 15:33:40 GMT (envelope-from git) Date: Mon, 31 Oct 2022 15:33:40 GMT Message-Id: <202210311533.29VFXemY060946@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: f504685a7ade - main - rack/bbr: put back assertion that connection is not in TIME-WAIT 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: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f504685a7adeae2677a5e45faf8674ff08e6ea90 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1667230421; 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=ewJJ2ALT659kXcps9dh3k2oJJ6hIdBxXhp11+WfcarE=; b=WgSw9a4K1Jk/VmvsMgqLg6ErAlLCBdRb5KG0y6l69/OUfX7FLYksbrNWC7s/tv5hy3Gt0a HOK45MKs6jv0713WyPqtbKx3w9AqhRCcLm/B04LjknVyUMxFk4FB6hLIG7qr2RdD1ThMdC EdV2EVjcnBHVfi9Betk0s/j7Bkhd+DK2BdK2cvMB9vmrLQGCkWJ/0DSPr65b1BtLfWL8ZU jNoPVj1NN4/Dfy6UJ/Z5+MQlQtzy2Qc+CNuiYsky9+aHZRtzRtIuhI4+dGeJaGj0t02QhM 7Gp6RiTM/4HXtnNr1NAZ3buVAK7vtD8e01EUILhU58KCaw94phAkJt7eseizww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1667230421; a=rsa-sha256; cv=none; b=FtUckgUf50sncJuIhMxYPvqyW0+jFQhGWC0jx8PRtwA6T3oZfCrW6+Jg3AJbp6BheSSZB2 CICJEidDnLLBLfnvuino6n3SG+3fv9HX4UGvI+QDu9Nbj5Cx0pulyCoS9eufGW/UOMnFUT m8oZ6kxiqdGygBMJC8kJqiLl3oeiH3Y6qVsPIvUjoTF9Mt5pCJKF7zFiqNBVaAh0GPED6a dr9BN7diAXZIooJ5XGxCr1EZQdBAEuYk6sgfbS7CthNwJpUqwq8Gut7ezEcgScN/xZ8a8j DrURYNujdz7O4wd0iU9iDILNa7MVmiAbEoLVM7UFClBjRqUKaVVQhtyHCMM1BQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f504685a7adeae2677a5e45faf8674ff08e6ea90 commit f504685a7adeae2677a5e45faf8674ff08e6ea90 Author: Gleb Smirnoff AuthorDate: 2022-10-31 15:30:59 +0000 Commit: Gleb Smirnoff CommitDate: 2022-10-31 15:30:59 +0000 rack/bbr: put back assertion that connection is not in TIME-WAIT The assertion was incorrectly removed in 0d7445193ab. The leak of a TIME-WAIT state into tfb_do_segment_nounlock method was fixed in 31bc602ff81. The TIME-WAIT connections are processed by the main tcp_input() always. --- sys/netinet/tcp_stacks/bbr.c | 2 ++ sys/netinet/tcp_stacks/rack.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 4a768487b9f6..a3294118bfc8 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -11359,6 +11359,8 @@ bbr_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, INP_WLOCK_ASSERT(tp->t_inpcb); KASSERT(tp->t_state > TCPS_LISTEN, ("%s: TCPS_LISTEN", __func__)); + KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", + __func__)); tp->t_rcvtime = ticks; /* diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 997e032e4a08..fdac23d0c5cc 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -14154,6 +14154,8 @@ rack_do_segment_nounlock(struct mbuf *m, struct tcphdr *th, struct socket *so, INP_WLOCK_ASSERT(tp->t_inpcb); KASSERT(tp->t_state > TCPS_LISTEN, ("%s: TCPS_LISTEN", __func__)); + KASSERT(tp->t_state != TCPS_TIME_WAIT, ("%s: TCPS_TIME_WAIT", + __func__)); if ((tp->t_state >= TCPS_FIN_WAIT_1) && (tp->t_flags & TF_GPUTINPROG)) {