git: 612ae9c9d06c - main - pf: add extra unhandled_af() assertions

From: Kristof Provost <kp_at_FreeBSD.org>
Date: Mon, 21 Apr 2025 12:49:11 UTC
The branch main has been updated by kp:

URL: https://cgit.FreeBSD.org/src/commit/?id=612ae9c9d06cb8b81043d7f45f22e01f8c1afe8b

commit 612ae9c9d06cb8b81043d7f45f22e01f8c1afe8b
Author:     Kristof Provost <kp@FreeBSD.org>
AuthorDate: 2025-04-18 14:41:15 +0000
Commit:     Kristof Provost <kp@FreeBSD.org>
CommitDate: 2025-04-21 08:43:32 +0000

    pf: add extra unhandled_af() assertions
    
    Verify naf, as well as af.
    
    Sponsored by:   Rubicon Communications, LLC ("Netgate")
---
 sys/netpfil/pf/pf.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c
index c00e736d4091..95dc6a318dd4 100644
--- a/sys/netpfil/pf/pf.c
+++ b/sys/netpfil/pf/pf.c
@@ -3315,6 +3315,8 @@ pf_change_ap(struct pf_pdesc *pd, struct pf_addr *a, u_int16_t *p,
 			    po, pn, u);
 			break;
 #endif /* INET6 */
+		default:
+			unhandled_af(pd->naf);
 		}
 		break;
 #endif /* INET */
@@ -3352,6 +3354,8 @@ pf_change_ap(struct pf_pdesc *pd, struct pf_addr *a, u_int16_t *p,
 
 			*pd->pcksum = pf_proto_cksum_fixup(pd->m, *pd->pcksum, po, pn, u);
 			break;
+		default:
+			unhandled_af(pd->naf);
 		}
 		break;
 #endif /* INET6 */