HomeFreeBSD

pf: do not reject rules with colliding hashes

Description

pf: do not reject rules with colliding hashes

We insert rules in pf_krule_global solely for the benefit of the
'keepcounters' feature. Failing to insert (beause the rule hash
collides, or an identical rule already exists) would be worse than
restoring counts to the wrong rule (or failing to restore them at all).

PR: 282863, 294860, 294859, 294858
MFC after: 3 days
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D56745

(cherry picked from commit a0e4c65f1814a7a677364dc29bb703f84323d175)

Details

Provenance
kpAuthored on Apr 29 2026, 3:04 PM
Differential Revision
D56745: pf: do not reject rules with colliding hashes
Parents
rGcab150feb82e: sys/time: appease gcc -Wtype-limits
Branches
Unknown
Tags
Unknown