pf_hash_rule_addr() hashes the fields an address type uses, but leaves
out the prefix length of an interface address: "from ($if)/24" and
"from ($if)/25" hash the same. pf_hash_pool() hashes a pool address
as a whole struct, pointer union cleared.
Hash both the same way, by type, and include the prefix length of an
interface address. This changes the hash of every rule with an
interface address or a pool: "set keepcounters" starts such rules at
zero once, on the first load after the change, and until both pfsync
peers run this version their ruleset checksums differ, so a state one
imports from the other is bound to the default rule, as with any
difference between the rulesets.
Add a regression test.
Sponsored by: Rubicon Communications, LLC ("Netgate")