From nobody Sat Aug 03 22:35:09 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 4WbyFT5VXBz5RScJ; Sat, 03 Aug 2024 22:35:09 +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 4WbyFT4nRTz4JB6; Sat, 3 Aug 2024 22:35:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724509; 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=MCwL4gjCLjbewp1ZZwEOO1KdEkl7CpU1v0pE717T4YY=; b=Z58/7esG0/UBgSMag1ZqmVa/kMSDz/fxcKGA7Vcsk6lPUDRlbNx6kGvjLuV3kadr8GXSuw 760SoE6Kuy0YHOItBDPhyO0OHpWnhJUoNtLnqBqA4/1jXzj+MxIfZi7FGFP5XJTvgMOdBX ALoLMxEt8NxeyYpDawdWs0nahbOxYsiUiZmztwhXHPuaqC3fN12gnU9STJjEqUEirtju5T KPDzMxRryyncSXWVGLpigDgBpW1hDYBwdA7pz6LkkFPNqIEyN5jigMs4h10WxGTEt/8Nzp 79sqxshlMPObvX9k5eQGWzpznA3k+w/WmFRC+XWBkmWHC5q7GqwW/D7IFfMOOA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722724509; a=rsa-sha256; cv=none; b=AniPbe+KkcpJ4YdUWcBYvi860ukAoA/LQY87q/rK8gBe4emr16x//yXclrdWESX8Dh0S1w rRCC8SW77YuPeJtGua7qTifeR/Lzm9wdxyTW4WOLDQ/IVzLVMgnctAIRCWpb4XEvywbTfZ nwI4tX05lBWk3NJ4gKcje0fy8563i16yvbDCVvQ9wuDWvzAZj7u35Sl7zC/POMurVgc5Cx 0g16dxc6luJ+CTGp5V9TssspB0VE5bgB9jbu22GVBIQocZikXFN/T5zyZpgeMvGmuNmyIA WIZ/zyCoawJyU0lFCkG+oFg35JLVQgmgFBcdPjqQELutV0Gp1TuSwDIbF4vzQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722724509; 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=MCwL4gjCLjbewp1ZZwEOO1KdEkl7CpU1v0pE717T4YY=; b=ZJhBxwxYROTvnUR05jmtKTu+EWnNnxtnmrtBqQknXC1H1GcwScQMe96c7ZAMeuXMBrAxdP 64TZ46PEl3JV4i1CqUnd0rpTQiwmz+TL8nDOvO4NTyAviZ+hi1N67bKR0mehqN8xFJ9rVR xLlv5/N8ZY/b50SGE1TaayIcO9jT20QQqr4VI0I3zqZA7K1l33x74ASs63DDvz23RJl4sB ZH+229bOFEN1JriezWTzVnAKLQ/EFtBlQ0nIGuVZ778wHWliOlO6UE/ldRoy/OKJT6I3RO ckrb7YIfLAHX7gXq3ZRp7zdxBi8fr837UuNk6tSnSdEIj3U5eGiI35qd27FASw== 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 4WbyFT4DVMzWCF; Sat, 3 Aug 2024 22:35:09 +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 473MZ987043299; Sat, 3 Aug 2024 22:35:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 473MZ9lG043296; Sat, 3 Aug 2024 22:35:09 GMT (envelope-from git) Date: Sat, 3 Aug 2024 22:35:09 GMT Message-Id: <202408032235.473MZ9lG043296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Michael Tuexen Subject: git: 205157fafc25 - stable/14 - tcp: fix sending RST after second inp lookup 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 205157fafc25f6711ef3670255f9ea328c344758 Auto-Submitted: auto-generated The branch stable/14 has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=205157fafc25f6711ef3670255f9ea328c344758 commit 205157fafc25f6711ef3670255f9ea328c344758 Author: Michael Tuexen AuthorDate: 2024-05-25 17:46:33 +0000 Commit: Michael Tuexen CommitDate: 2024-08-03 22:34:38 +0000 tcp: fix sending RST after second inp lookup When we first find an inp, we set also the tp. If then a second lookup is necessary, the inp is recomputed. If this fails, the tp is not cleared, which resulted in failing KASSERT. Therefore, clear the tp when staring the inp lookup procedure. Reported by: Jenkins Fixes: 02d15215cef2 ("tcp: improve blackhole support") Sponsored by: Netflix, Inc. (cherry picked from commit df9de82f54d13aa077889349e15d9bf7794a1e6f) --- sys/netinet/tcp_input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index a45eb3201f7e..133818b73a1d 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -829,6 +829,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) ((thflags & (TH_ACK|TH_SYN)) == TH_SYN ? INPLOOKUP_RLOCKPCB : INPLOOKUP_WLOCKPCB); findpcb: + tp = NULL; #ifdef INET6 if (isipv6 && fwd_tag != NULL) { struct sockaddr_in6 *next_hop6;