HomeFreeBSD

pf: fix panic on deferred packets

Description

pf: fix panic on deferred packets

The pfsync_defer_tmo() callout needs to set the correct vnet before it
can transmit packets. It used the rcvif in the mbuf to get this vnet,
but that doesn't work for locally originated traffic. In that case the
rcvif pointer is NULL, and the dereference leads to a panic.

Instead use the sc_sync_if, which is always set (if pfsync is enabled,
at least).

PR: 268246
MFC after: 2 weeks

(cherry picked from commit fd02192c3acaefeb62db11e0c10ab36240b79ba2)

Details

Provenance
kpAuthored on Jan 13 2023, 3:34 AM
Parents
rG3ec68505d6b9: 13.2: update stable/13 to -PRERELEASE to start the release cycle
Branches
Unknown
Tags
Unknown