From nobody Sat May 25 17:58:56 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 4VmqR43RKHz5LJ2k; Sat, 25 May 2024 17:58:56 +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 4VmqR42wtmz4XR9; Sat, 25 May 2024 17:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716659936; 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=tXs7LUHppWxKmf+/TQ5dXQfzqfUz2PlDLGqHmvCRthM=; b=g2WJyobuDpwQoByhXvkFVc3WiGIt/ityn/gsNFIyqLoiylrsLpvTncbHVJZ+VWosUu9Upz KQ79mrGrIZJr8rg5TKD+ttEn5Q/jI13kGR0s7pP/Zw+0pvTN6CDgE5yhd3dX+55YlnCs77 mIwFznRKipyX+cVzOMQ0UOFsP6TfPnFc0dfcDOxls7tA+ul/4pWp14u3yPYP+dt0DrX/qW qI9dO8wT/dzspiB9L8e2JwcWmHMKS5PH8PHEXTakQHjvM3zSIoTXn4Zu7EpUO/7KV1OqyP UVkZZZFmg2ZFLAr3MsTcztOJ71THd9gUqqunm07wqTh01Z4J3/rp3l5CgCElLQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716659936; a=rsa-sha256; cv=none; b=XWRg2Beh9arE1/ohY35RhtB3ElSxplA956N2AEwNDjWefVYzt2NUYo7APREwYDRbU5qd2L kfR2aH8Uq1z34+GyRU3/5k/MM9ok8+00TvMXb1kTNAZSUWxM66+fpAJ0lM6twPP3JKBU0/ rSPNqTAk/95e9SAyyIzd4+BwKCXxouKEwYjJEVjwKLH+3FmX96asMuM48h6c4cnt9tpOwK /ue0KZ6OhkSENYgxBPmze5ktKSTJ+wZLqGRMz+djC40aQVeZV0/KiFfGUmx4vl6Cr3Wgzn 5Ww+FB/XP2dD2nUfgliiFtGowCJcu0nM8s2Qc1cEeo1KEQT1zXZElPNCZcWFDA== 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=1716659936; 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=tXs7LUHppWxKmf+/TQ5dXQfzqfUz2PlDLGqHmvCRthM=; b=CVkjiWTr0WJHr6azPklGuWWK27rRuizENUiWxby9FUlpR8CiQ6EMOOaIKKK0Gr0uV8zmP+ Yjlsn2IdYXn4U3bFW2O13soK9cIvS2JxOJGF351TFRXkuMUXlshxfYSYcrbqUmUeYhgnzg 6lYWO/5UaQDCOdIYbXe5yXQi/66OakasI61MOX/K9zwan8in4QdoWe5GaLckPC2BYw/wWM ov/r5RyTO6R45eerUxhdzpd6yeJpQnRHjkJY95s5a8Eda6SEZ23YITuiQGfeoqOLrYm1U1 y+EM/EPHe3aypgziFFgiuwrn1NN/kktKdAeKdEHKkonrQXTY/21wEzK+SsZcfA== 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 4VmqR42GP9zRSl; Sat, 25 May 2024 17:58:56 +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 44PHwumd077508; Sat, 25 May 2024 17:58:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44PHwuRw077506; Sat, 25 May 2024 17:58:56 GMT (envelope-from git) Date: Sat, 25 May 2024 17:58:56 GMT Message-Id: <202405251758.44PHwuRw077506@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: df9de82f54d1 - main - tcp: fix sending RST after second inp lookup 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: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df9de82f54d13aa077889349e15d9bf7794a1e6f Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=df9de82f54d13aa077889349e15d9bf7794a1e6f commit df9de82f54d13aa077889349e15d9bf7794a1e6f Author: Michael Tuexen AuthorDate: 2024-05-25 17:46:33 +0000 Commit: Michael Tuexen CommitDate: 2024-05-25 17:58:48 +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") MFC after: 1 week Sponsored by: Netflix, Inc. --- 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 08ff84039c90..7faa815fc1ac 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -833,6 +833,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;