]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r345177:
authorkp <kp@FreeBSD.org>
Fri, 29 Mar 2019 14:34:50 +0000 (14:34 +0000)
committerkp <kp@FreeBSD.org>
Fri, 29 Mar 2019 14:34:50 +0000 (14:34 +0000)
commitb61905b6d231aa70f5e670af10ad1c1fceb59094
tree06d0016f33f006b68e54fa8d57caceb9f9cc214a
parent5c853e813f944fa5165e03bd714cbe627e63aa32
MFC r345177:

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>
sys/net/pfvar.h
sys/netpfil/pf/pf_table.c