HomeFreeBSD

pf: Check for main ruleset explicitly

Description

pf: Check for main ruleset explicitly

All rulesets reference their parent anchor, except for the special cased
main anchor containing the main ruleset, which's reference is always NULL
since initialization and never changes.

Replacing nullity tests with clearer equality checks makes the code less
ambigious and easier to understand.

OK sashan

Obtained from: OpenBSD, kn <kn@openbsd.org>, 55038654e1
Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on Jun 30 2025, 5:12 PM
Parents
rGddb8faceb1dd: pf.4: DIOCIGETIFACES provides interfaces and groups, not drivers
Branches
Unknown
Tags
Unknown