HomeFreeBSD

pf: fix rules_counter:keepcounters test

Description

pf: fix rules_counter:keepcounters test

The previous pf_krule_global leak fix was a bit too aggressive and cleaned up
the inactive tree pointer before we needed it to preserve counters. Only clean
up anchors that are entirely unused. Clean up pf_main_ruleset on pf shutdown.

PR: 289299
MFC after: 1 week
Fixes: 275ff85b25 ("pf: fix struct pf_krule_global leak")
Sponsored by: Rubicon Communications, LLC ("Netgate")

(cherry picked from commit e63534edbcd050215bc109cd89a31ba30c5ea850)

Details

Provenance
kpAuthored on Sep 17 2025, 8:12 AM
Parents
rG6bcce275a5a9: ifconfig: Display the IFCAP_HWSTATS capability without netlink
Branches
Unknown
Tags
Unknown