aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristof Provost <kp@FreeBSD.org>2024-08-28 13:40:42 +0000
committerKristof Provost <kp@FreeBSD.org>2024-09-16 11:46:14 +0000
commit50ecaf1bd46a834c4fdaf483eb39df7bb62501e3 (patch)
tree5e5060b6bcd3d22e8cdbc2ec5c8c31cfdeb3b420
parent2ca286d0d2609bbb021f6eaecc6a6b864705719e (diff)
downloadsrc-50ecaf1bd46a834c4fdaf483eb39df7bb62501e3.tar.gz
src-50ecaf1bd46a834c4fdaf483eb39df7bb62501e3.zip
pf: use AF_INET6 when comparing IPv6 addresses
Reviewed by: zlei MFC after: 1 week Obtained from: OpenBSD, henning <henning@openbsd.org>, cf7c0bf78a Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D46576
-rw-r--r--sys/netpfil/pf/pf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index cb404b93946e..d675c5381e8a 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -7648,10 +7648,10 @@ pf_test_state_other(struct pf_kstate **state, struct pfi_kkif *kif,
#endif /* INET */
#ifdef INET6
case AF_INET6:
- if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], AF_INET))
+ if (PF_ANEQ(pd->src, &nk->addr[pd->sidx], AF_INET6))
PF_ACPY(pd->src, &nk->addr[pd->sidx], pd->af);
- if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], AF_INET))
+ if (PF_ANEQ(pd->dst, &nk->addr[pd->didx], AF_INET6))
PF_ACPY(pd->dst, &nk->addr[pd->didx], pd->af);
#endif /* INET6 */
}