]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
Merge r261882, r261898, r261937, r262760, r262799:
authorglebius <glebius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 11 Mar 2014 15:43:06 +0000 (15:43 +0000)
committerglebius <glebius@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 11 Mar 2014 15:43:06 +0000 (15:43 +0000)
commit6aae9115b230e79cbd200cbc976e261b8f400afa
tree21738f0e36adc0d336cb80148b7c296cd41323bf
parent95aa33830184f66565656b8453d3cd2abe48a803
Merge r261882, r261898, r261937, r262760, r262799:
  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.

git-svn-id: svn://svn.freebsd.org/base/stable/10@263029 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sbin/pfctl/pfctl.c
sys/net/pfvar.h
sys/netpfil/pf/if_pfsync.c
sys/netpfil/pf/pf.c
sys/netpfil/pf/pf_ioctl.c