From nobody Wed Sep 4 08:53:31 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 4WzGVg6vzKz5TS4x; Wed, 04 Sep 2024 08:53:31 +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 4WzGVg6N2bz4XRm; Wed, 4 Sep 2024 08:53:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725440011; 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=wyCmOssdMAbTYAq3I8VCL0MIhAJ3a+zvRA+YILVUOb4=; b=cJHdrtIKEKrN/txnRVxIuR0PdPzpF1no2P0mPQ+rSjV3+uB7Yx3bcfFOupBezYY4tMU999 gydqjVNCzgL11L+UKhklNUc6gtFRFrPbojl8kPd3B8MP9/i4HdUQNNmZLz/qcnNL+9TV3f B6aL9zSuJ2NEwY/kBUbjQ0/0CHNafyqVYKRzcHeZuQJ3OsqwvbOx+WhjIIQ75onQ+tZZUg yVI9uJsN4jhPIqPnd3tL33/yCRnggXSMtpxKEgGXVOqZpxWiwxCS7yjOHb7wEV0tdoIIe+ 1rLZXsy4Ny5CdGETDdJ/sdBMoIvCIDFyaM1ZvZ+BjQSlCam6EvEbQ+W7Hzy+cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725440011; a=rsa-sha256; cv=none; b=mvz/PfqBsTz02LXGKsh1dXhtvXqzrHpkelE14/TDlfdz1bU4ouqMApNXAZdZBfNCtU9ZyY sTjSk4UstWhlcUgGoMybECrpdYOvTlsNzJW3GwPjrzH3ddBL1zcutBFMuKpQYV6Lt9PWib Vz8U8pbHtVyplQ+Vy4ag9U3JtFREcD4Ie9u4F/h8a8DDo+ddluNErn2Oi6r7nYZkiNooXJ wDE2czYEbYpQHbM+yTVSjOQ/tsMAIpEuJYOkzKxK6LULpOKxZh4hHGbc43I6uVDLW6F2kh H/SxRu2H0LnedgUOTPXBg0/j2kOTwdIMTbtBVEq16AE2pg2rlcRZl+I7yuW5Vg== 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=1725440011; 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=wyCmOssdMAbTYAq3I8VCL0MIhAJ3a+zvRA+YILVUOb4=; b=OalL+0w9D0G1nj7WeR0eoeP+HQwfzxIwfAKTzWdEmr/K5DOGDoeW0/hIu/BvZQ5z6YFToj lBeivpxSW99e+hPYdygG4Zo9FxjOSITDw7Tr6XbhwN1givEFg+nvXZ/iytan0G7gauA5KL 1+tVeaimXeheUjRnWMWfpW0x+M/aCygn9z8z7XNSbRXolw29SbLEtC3/evFg8lareukBQo LYp1Vst0WNam1RRfnYzX+vOpuKm2bBV7IGSkZgLVDehMVPtLLyQg/Wfj0DLFV82S8euU+T 1Pe7vwUiZznZymkjLFuJgfGnZvyZWjb/YEvS0JGQRf5QosmV9MhpPKGf6hjAcQ== 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 4WzGVg60LnzHWg; Wed, 4 Sep 2024 08:53:31 +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 4848rVEo005623; Wed, 4 Sep 2024 08:53:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4848rVlo005620; Wed, 4 Sep 2024 08:53:31 GMT (envelope-from git) Date: Wed, 4 Sep 2024 08:53:31 GMT Message-Id: <202409040853.4848rVlo005620@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: f40b0e735177 - stable/14 - 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/14 X-Git-Reftype: branch X-Git-Commit: f40b0e735177b25ce67fb488a93834168f4c16e1 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=f40b0e735177b25ce67fb488a93834168f4c16e1 commit f40b0e735177b25ce67fb488a93834168f4c16e1 Author: Kristof Provost AuthorDate: 2024-08-26 14:42:05 +0000 Commit: Kristof Provost CommitDate: 2024-09-04 08:38:15 +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 62ee12322e8b..5d492394eb87 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7224,11 +7224,11 @@ pf_test_state_icmp(struct pf_kstate **state, 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);