: On FreeBSD, you can try pkg install -f pf to force a reinstall of the userland tools.
Compiling a custom kernel without updating the userland system binaries creates a version mismatch between pfctl and the kernel module. pf configuration incompatible with pf program version
pfctl -f /etc/pf.current.rules
The most common cause is a partial or interrupted system upgrade. When upgrading to a newer version of FreeBSD or OpenBSD, the operating system binary files ( /sbin/pfctl ) may be updated before the running kernel is replaced and rebooted, or vice versa. If the kernel expects a specific structure for rule compilation and the utility provides an older or newer format, the handshake fails. 2. Discrepancies Between Userland and Kernel : On FreeBSD, you can try pkg install
# Save current active rules (compatible with running kernel) pfctl -sr > /etc/pf.current.rules When upgrading to a newer version of FreeBSD