After 3daae1ac1d82 was committed Dec.15, my system panics while starting up ipfw. kernel: ipfw2 (+ipv6) initialized, divert loadable, nat loadable, default to deny, logging disabled kernel: panic: Assertion tap->rule == rule failed at /usr/src/sys/netpfil/ipfw/ip_fw_bpf.c:86 kernel: cpuid = 11 kernel: time = 1766124707 kernel: KDB: stack backtrace: kernel: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe00eb3d3900 kernel: vpanic() at vpanic+0x136/frame 0xfffffe00eb3d3a30 kernel: panic() at panic+0x43/frame 0xfffffe00eb3d3a90 kernel: ipfw_tap_alloc() at ipfw_tap_alloc+0x2f7/frame 0xfffffe00eb3d3ac0 kernel: add_rules() at add_rules+0x137/frame 0xfffffe00eb3d3b30 kernel: ipfw_ctl3() at ipfw_ctl3+0x365/frame 0xfffffe00eb3d3ce0 kernel: sogetopt() at sogetopt+0x15a/frame 0xfffffe00eb3d3d40 kernel: kern_getsockopt() at kern_getsockopt+0xb5/frame 0xfffffe00eb3d3dd0 kernel: sys_getsockopt() at sys_getsockopt+0x52/frame 0xfffffe00eb3d3e00 kernel: amd64_syscall() at amd64_syscall+0x169/frame 0xfffffe00eb3d3f30 kernel: fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe00eb3d3f30 kernel: --- syscall (118, FreeBSD ELF64, getsockopt), rip = 0x1d91f7dd13da, rsp = 0x1d91f513d1a8$ kernel: KDB: enter: panic The commit was found by git bisect.
Can you please try to narrow down and share the exact rule that triggers the panic?
I commented out every line except the final like to log any pack that reached the end without being allowed. It still panicked. Here are the only non-commented lines: #!/bin/sh ipfw -q -f flush cmd="ipfw -q add" pif="wlan0" # interface name of NIC attached to Internet [About 160 lines starting with '#' $cmd 65534 deny log logamount 1000 ip from any to any Still panicked.
Thanks, that helped to reproduce.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=129e15d4994311958db59a1718d4ff42d440ce2b commit 129e15d4994311958db59a1718d4ff42d440ce2b Author: Gleb Smirnoff <glebius@FreeBSD.org> AuthorDate: 2025-12-22 01:18:27 +0000 Commit: Gleb Smirnoff <glebius@FreeBSD.org> CommitDate: 2025-12-22 02:23:14 +0000 ipfw: fix bpf tap point lookup The trick I blindly used works for pointers to structs, but not for rule numbers that can differ only by 1. PR: 291854 Fixes: 3daae1ac1d82ecdcd855101bab5206e914b12350 sys/netpfil/ipfw/ip_fw_bpf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
On recent CURRENT: FreeBSD 16.0-CURRENT #7 main-n282705-8d5a11cd0137: Wed Dec 24 12:14:13 CET 2025 amd64, a "service ipfw restart" or stopping jails via "service jail stop" panics the systems (I have several running recent CURRENT as of today, 25th Dec 2025, IPFW statically compiled in kernel). The problem is still present. On CURRENT email list, R. Klopp mentioned tap being an issue. On all systems a tap0 device is present.
(In reply to O. Hartmann from comment #5) This must be a different problem than the original that opened this bug report. Can you please share your backtrace and panic message? Preferably as a new bug report or just email to me.