git: 215c58a1c677 - main - pf: make unhandled_af() inline
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 04 Dec 2025 16:44:51 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=215c58a1c677aa191db9afcc1d75d7ba13426a7f
commit 215c58a1c677aa191db9afcc1d75d7ba13426a7f
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-12-04 16:29:17 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-12-04 16:29:17 +0000
pf: make unhandled_af() inline
Otherwise you just can't include pfvar.h without compiling pf in.
Reviewed by: kp
Differential Revision: https://reviews.freebsd.org/D54064
---
sys/net/pfvar.h | 6 +++++-
sys/netpfil/pf/pf_ioctl.c | 6 ------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h
index ce266a267f3c..7568b83f89fd 100644
--- a/sys/net/pfvar.h
+++ b/sys/net/pfvar.h
@@ -571,7 +571,11 @@ extern struct sx pf_end_lock;
#ifdef _KERNEL
-void unhandled_af(int) __dead2;
+static inline __dead2 void
+unhandled_af(int af)
+{
+ panic("unhandled af %d", af);
+}
static void inline
pf_addrcpy(struct pf_addr *dst, const struct pf_addr *src, sa_family_t af)
diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c
index 5ec67021068b..6774aaac2ecd 100644
--- a/sys/netpfil/pf/pf_ioctl.c
+++ b/sys/netpfil/pf/pf_ioctl.c
@@ -2521,12 +2521,6 @@ relock_DIOCKILLSTATES:
return (killed);
}
-void
-unhandled_af(int af)
-{
- panic("unhandled af %d", af);
-}
-
int
pf_start(void)
{