HomeFreeBSD

pf :Use counter(9) in pf tables.

Description

pf :Use counter(9) in pf tables.

The counters of pf tables are updated outside the rule lock. That means state
updates might overwrite each other. Furthermore allocation and
freeing of counters happens outside the lock as well.

Use counter(9) for the counters, and always allocate the counter table
element, so that the race condition cannot happen any more.

PR: 230619
Submitted by: Kajetan Staszkiewicz <vegeta@tuxpowered.net>
Reviewed by: glebius
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D19558

Details

Committed
kpMar 15 2019, 11:08 AM
Reviewer
glebius
Differential Revision
D19558: pf :Use counter(9) in pf tables.
Parents
rS345176: MFC r344921:
Branches
Unknown
Tags
Unknown