HomeFreeBSD

pf: cope with missing rpool.cur

Description

pf: cope with missing rpool.cur

If we're evaluating a pfsync'd state (and have different rules on both
ends) our state may point to the default rule, which does not have
rpool.cur set. As a result we can end up dereferencing a NULL pointer.

Explicitly check for this when we try to re-construct the route-to interface.

Also add a test case which can trigger this issue.

MFC after: 3 days
See also: https://redmine.pfsense.org/issues/14804
Sponsored by: Rubicon Communications, LLC ("Netgate")
Approved by: gjb (re)

(cherry picked from commit 74c2461386ea5eeb41e674df6b16a44b0509a882)
(cherry picked from commit f69181e9de1b021f4689ce50b420f9c694268ec8)

Details

Provenance
kpAuthored on Oct 3 2023, 3:11 PM
Parents
rGd67558ef3149: Fix padding in struct tcp_info
Branches
Unknown
Tags
Unknown