HomeFreeBSD

pf: allocate krule->timestamp in pf_krule_alloc()

Description

pf: allocate krule->timestamp in pf_krule_alloc()

There are three calls which can allocate a new rule. DIOCADDRULE,
DIOCADDRULENV and DIOCCHANGERULE. The first two call pf_ioctl_addrule(),
but DIOCCHANGERULE does not. As a result rules created through
DIOCCHANGERULE do not have the timestamp per-cpu memory allocated, and
we panic when the rule is exported with pf_krule_to_nvrule().

Sponsored by: Rubicon Communications, LLC ("Netgate")

Details

Provenance
kpAuthored on May 17 2022, 12:41 PM
Parents
rG71fe907dfb03: LinuxKPI: Switch irq_work implementation back to standard taskqueue
Branches
Unknown
Tags
Unknown