git: 706b42cc4bd9 - main - pf: give the correct address family to dummynet after nat64

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Tue, 17 Dec 2024 10:08:18 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=706b42cc4bd9a255ed920b1a4095856f8df9e52c

commit 706b42cc4bd9a255ed920b1a4095856f8df9e52c
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2024-12-12 12:50:24 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2024-12-17 10:07:18 +0000

    pf: give the correct address family to dummynet after nat64
    
    Pass the new address family rather than the incoming one. In most (i.e. all but
    nat64) that's the same, but for nat64 we want the new address family instead.
    
    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 d9c0beb0169f..9128562fd71c 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -9381,7 +9381,7 @@ pf_pdesc_to_dnflow(const struct pf_pdesc *pd, const struct pf_krule *r,
 
 	dnflow->f_id.proto = pd->proto;
 	dnflow->f_id.extra = dnflow->rule.info;
-	switch (pd->af) {
+	switch (pd->naf) {
 	case AF_INET:
 		dnflow->f_id.addr_type = 4;
 		dnflow->f_id.src_ip = ntohl(pd->src->v4.s_addr);
@@ -9490,7 +9490,7 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s,
 
 		MPASS(sa != NULL);
 
-		switch (pd->af) {
+		switch (pd->naf) {
 		case AF_INET:
 			memcpy(&pd->pf_mtag->dst, sa,
 			    sizeof(struct sockaddr_in));