diff options
author | Kristof Provost <kp@FreeBSD.org> | 2024-08-28 13:40:42 +0000 |
---|---|---|
committer | Kristof Provost <kp@FreeBSD.org> | 2024-09-16 11:46:14 +0000 |
commit | 50ecaf1bd46a834c4fdaf483eb39df7bb62501e3 (patch) | |
tree | 5e5060b6bcd3d22e8cdbc2ec5c8c31cfdeb3b420 | |
parent | 2ca286d0d2609bbb021f6eaecc6a6b864705719e (diff) | |
download | src-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.c | 4 |
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 */ } |