From nobody Sun Sep 01 15:06:10 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 4WxZw26T3Kz5VLJB; Sun, 01 Sep 2024 15:06:10 +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 4WxZw25Pnyz4YXn; Sun, 1 Sep 2024 15:06:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725203170; 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=78FXSSu7+Xz/y7x5f2PIKBAAsPt3kpC9UVdUPQGx4wY=; b=eS+KEOkWPcflpOws5GKStAAAg5UdY40LtpbftBwNc7HlxKqc/RSJly7a1Lb9NfnjwAsa54 wrFKBYBFgcO5lEzy+TlN1UAumUqwSL+Lja0rpWTxTTjVXLnSiKvh5rd3sOHsgXl08oI2+h hqEUSzOk0MHcFXnNnxpJCmGH5j8GwWdsYQhbOjZ+HqMwNXpu2qes3ViYXOYZxnx6NIrKju ZiNgQkT8JhJzZZgBE835ofXuJClYLVNawdyljbhSeuWDro8g6HtCp/ChV6xo+UZsmUVrVw vCSN/8p2s3zZ4z44lZkOon2XyMfJL/H/99CGOwitKutPPK0ZIAkdkGfWB0eRLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725203170; a=rsa-sha256; cv=none; b=tOFU4Xj6Z29Sry4ZCM2Iu9Eqzm+WMkLe5Oz1LHdcoeBURAABhMO1PDIKKN1gcJ2IAC8BW4 v/wwiE2ckurLPDyIZhPvwuTja5wmYsR25BDyWWGoTsED8IZWM5JUpTxXAQEvNcMp5eKzxm 3oJU2EEADZUcNHtDKQw+qIfidYeIq3KI0umW4yc7O4WvXmjwyqJx2Gl0vsrAXTN+8Fz3+N d8BQ7yS1BaDy4R/Y+I0BJebNpW/aSjPpdt/W1f5mn7AzLzeIvyzVsol3Bkv6sH2Jc3mo6e u9liWbPfdckjg8g3ElzZCos1w2hkJsk6O3HjQL3oTUT2Icwq016g6BsW0BeV/g== 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=1725203170; 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=78FXSSu7+Xz/y7x5f2PIKBAAsPt3kpC9UVdUPQGx4wY=; b=fFOW8nvwEd+HmKrHOKad0ZQbtTyySAJSCQ5+KkF3oi7HN/3yTe0lxIunr+KRC3FK5aRpIm MoU6ztze/ee6h+von7ktdcC/TYem2xACjGUBC1QSiL8knDhkdnp3R5D6P7G0XdEYM/FlYB KQBuAdolitg97a4jjBptSsOES4tzBxXdVo4H38AAqLW+Mef6KPCMGGzXgArc80rwoG1Ell snoGmD9pwGqhGQJBcXZRTJL+y1qu5LYMMvzQowpqi79ZeugPqYJzB72TtoJVjGWBlyWNnt 1q2gknLATR7/bsuXAkTRJwAkf7jsD0bBCX6lYmhcAn9KDx0YBt3z5uaN18H2Xw== 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 4WxZw24d7fzYLK; Sun, 1 Sep 2024 15:06:10 +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 481F6A6l002598; Sun, 1 Sep 2024 15:06:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 481F6AeA002595; Sun, 1 Sep 2024 15:06:10 GMT (envelope-from git) Date: Sun, 1 Sep 2024 15:06:10 GMT Message-Id: <202409011506.481F6AeA002595@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b8cd169efa6a - main - 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/main X-Git-Reftype: branch X-Git-Commit: b8cd169efa6ac0899b4998898129765ae5c685a6 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b8cd169efa6ac0899b4998898129765ae5c685a6 commit b8cd169efa6ac0899b4998898129765ae5c685a6 Author: Kristof Provost AuthorDate: 2024-08-26 14:42:05 +0000 Commit: Kristof Provost CommitDate: 2024-09-01 15:05:28 +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") --- 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 b4f8bdeeff24..94c333e67c57 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -7274,11 +7274,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);