git: b8cd169efa6a - main - pf: try to lookup the icmp state based on a correct packet descriptor
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 01 Sep 2024 15:06:10 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b8cd169efa6ac0899b4998898129765ae5c685a6 commit b8cd169efa6ac0899b4998898129765ae5c685a6 Author: Kristof Provost <kp@FreeBSD.org> AuthorDate: 2024-08-26 14:42:05 +0000 Commit: Kristof Provost <kp@FreeBSD.org> 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 <mikeb@openbsd.org>, 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);