freebsd-nq/sys/netpfil/pf
Mark Johnston e6aed06fdf pf: Fix table entry counter toggling
When updating a table, pf will keep existing table entry structures
corresponding to addresses that are in both of the old and new tables.
However, the update may also enable or disable per-entry counters which
are allocated separately.  Thus when toggling PFR_TFLAG_COUNTERS, the
entries may be missing counters or may have unused counters allocated.

Fix the problem by modifying pfr_ina_commit() to transfer counters
from or to entries in the shadow table.

PR:		251414
Reported by:	sigsys@gmail.com
Reviewed by:	kp
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D27440
2020-12-02 16:01:43 +00:00
..
if_pflog.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
if_pfsync.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
in4_cksum.c
pf_altq.h Extended pf(4) ioctl interface and pfctl(8) to allow bandwidths of 2018-08-22 19:38:48 +00:00
pf_if.c pf: do not remove kifs that are referenced by rules 2020-10-13 11:04:00 +00:00
pf_ioctl.c pf: Make tag hashing more robust 2020-11-24 16:18:47 +00:00
pf_lb.c pf: Fix endless loop on NAT exhaustion with sticky-address 2018-12-12 20:15:06 +00:00
pf_mtag.h
pf_norm.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
pf_osfp.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
pf_ruleset.c net: clean up empty lines in .c and .h files 2020-09-01 21:19:14 +00:00
pf_table.c pf: Fix table entry counter toggling 2020-12-02 16:01:43 +00:00
pf.c pf: Fix incorrect assertion 2020-11-20 10:08:33 +00:00
pf.h netpfil: Introduce PFIL_FWD flag 2018-03-23 16:56:44 +00:00