From nobody Wed Sep 04 08:53:32 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 4WzGVh58dlz5TS9B; Wed, 04 Sep 2024 08:53:32 +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 4WzGVh3QVmz4Xrj; Wed, 4 Sep 2024 08:53:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725440012; 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=1QQakvTxOFS33r6Gh9ORsLaG1CXnqZQaTExWbFWrXUI=; b=G8czzyPcraY4XQ1qt5FXj5VVxo6Um9l03N2rBfN6HO5gwD1AeCCJWV1ZBrNFys64AHnfgu TX6KS9zGPcc5WOene14DrfQAOJilfllUCsP9V8BodBOm+OVk0B+JfGMHrZCSpvqHlDbUAM CeNCbXXyQVUu1P+3g/uVqELYcMT6tt1F/FunXGIaifYdYYm2wEOA6F8abbpnO+TDvoVwao ip7MFYBrHBJEWacR1OUwJ/mUMG/U3k85XtzgiXBDoxO9mcfA5V99Jg9OK82kuflyeLzRGS 2x73enHtc0b7exI5iennUakmdUMzLfC/+kRvxaZU9vvda2Mn9jXZ45V2TFH1qA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725440012; a=rsa-sha256; cv=none; b=XcaZE0QfhpRqxEKT/XMR62cW5OX/QApQd2X7tuGoU70Y6vqHEp/Mzb3qFCXI6TAQNf0T3k dddR1qHtVGyE7O/mzAQaMJ8xlg2U4aR9VDho6XT9dbwVLwuKqwny9u2HaVE/h9d5AQXRt2 7gh22NtSY7n5l7wewBNRBQPL70bzS7mLGMBa1nyCTtoNvkGDgwcmaAKwlCEY/sqAEqKuZq e6KPhCKltRu/fx3JrZUv8OgWNFlV9uzt0B6TF0HLpOpTq1kUpETFBd2aAfV8r149vkMfXA K92VzjBti4LKl5UyaCXsjGE1uRZMKkjS2P1xp9smxHHd65+sViTEECBZxMsSrA== 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=1725440012; 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=1QQakvTxOFS33r6Gh9ORsLaG1CXnqZQaTExWbFWrXUI=; b=bZuG6afFrGhxvE6Gw5GJE7pATi/kEHL7JmjwYUuP99MsV+jnzn6dGt5Db31LIotaCHuu4Z ipu4TNt8kfac9y/+cd3ChZUt1SXGheApr0S4MtDK2FYsRpMEBsfU08YbkxBlKvAlm8vpjG LV0hDjd//pj6Jm4esPQmvOSENn82MAKuWNhdNYUVn7XQuov6dWEkUOSYNcYHTHPqjh6Zh1 ROPqnWfEepL2mbLFf4qIKlgVrBDwecRHl6vmbRSnLi0wGSfcBunYRIPHyccaW3GCxi2tKo wADYBqXA3J0Vm2QmQKn1EIsQRbQaicgx4W3RfTrc+YZH8+S/Mact+Zslw5yuCA== 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 4WzGVh32WCzJCH; Wed, 4 Sep 2024 08:53:32 +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 4848rWcL005689; Wed, 4 Sep 2024 08:53:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4848rWPo005686; Wed, 4 Sep 2024 08:53:32 GMT (envelope-from git) Date: Wed, 4 Sep 2024 08:53:32 GMT Message-Id: <202409040853.4848rWPo005686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: fa4b64836183 - stable/13 - pf: try to lookup the icmp state based on a correct packet descriptor 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: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: fa4b64836183c33631d92dadb073a9e435c5bf6d Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=fa4b64836183c33631d92dadb073a9e435c5bf6d commit fa4b64836183c33631d92dadb073a9e435c5bf6d Author: Kristof Provost AuthorDate: 2024-08-26 14:42:05 +0000 Commit: Kristof Provost CommitDate: 2024-09-04 08:53:06 +0000 pf: try to lookup the icmp state based on a correct packet descriptor MFC after: 1 week Obtained from: OpenBSD, mikeb , e467ea25dcd3 Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit b8cd169efa6ac0899b4998898129765ae5c685a6) --- sys/netpfil/pf/pf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f55ed99153b1..ef6a2bd7de40 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6632,11 +6632,11 @@ pf_test_state_icmp(struct pf_kstate **state, int direction, struct pfi_kkif *kif pd->dir, kif, virtual_id, virtual_type, icmp_dir, &iidx, PF_ICMP_MULTI_NONE, 1); if (ret >= 0) { - if (ret == PF_DROP && pd->af == AF_INET6 && + if (ret == PF_DROP && pd2.af == AF_INET6 && icmp_dir == PF_OUT) { if (*state != NULL) PF_STATE_UNLOCK((*state)); - ret = pf_icmp_state_lookup(&key, pd, + ret = pf_icmp_state_lookup(&key, &pd2, state, m, off, pd->dir, kif, virtual_id, virtual_type, icmp_dir, &iidx, multi, 1);