71d3a4f585
Once pf became not covered by a single mutex, many counters in it became race prone. Some just gather statistics, but some are later used in different calculations. A real problem was the race provoked underflow of the states_cur counter on a rule. Once it goes below zero, it wraps to UINT32_MAX. Later this value is used in pf_state_expires() and any state created by this rule is immediately expired. Thus, make fields states_cur, states_tot and src_nodes of struct pf_rule be counter(9)s. |
||
---|---|---|
.. | ||
Makefile | ||
parse.y | ||
pf_print_state.c | ||
pfctl_altq.c | ||
pfctl_optimize.c | ||
pfctl_osfp.c | ||
pfctl_parser.c | ||
pfctl_parser.h | ||
pfctl_qstats.c | ||
pfctl_radix.c | ||
pfctl_table.c | ||
pfctl.8 | ||
pfctl.c | ||
pfctl.h |