HomeFreeBSD

pf: don't use state keys after pf_state_insert()

Description

pf: don't use state keys after pf_state_insert()

pf_state_insert() may free the state keys, it's not safe to access these
pointers after the call.

Introduce osrc/odst (similar to osport/odport) to store the original source and
destination addresses. This allows us to undo NAT transformations without having
to access the state keys.

Reviewed by: glebius, markj
MFC after: 3 weeks
Sponsored by: Rubicon Communications, LLC ("Netgate")
Differential Revision: https://reviews.freebsd.org/D49551

Details

Provenance
kpAuthored on Thu, Mar 27, 2:35 PM
Reviewer
glebius
Differential Revision
D49551: pf: don't use state keys after pf_state_insert()
Parents
rG8efd2acf07bc: pf: improve pf_state_key_attach() error handling
Branches
Unknown
Tags
Unknown