Files
freebsd/sbin
R. Christian McDonald 55a69b9be8 libpfctl: zero the counters before summing per-chunk results
The chunked table address functions (set, add, del, clr_astats) add
each chunk's result to the caller's counter without initialising it.
pfctl reuses nadd for the number of tables created, so a replace that
also creates the table is off by one:

pfctl -t foo -T replace 192.0.2.1

reports "2 addresses added".

Zero the counters first, as pfctl_test_addrs() already does. Remove
the workaround for the add case from pfctl (da64f6e047), which is
no longer needed.

Add a regression test.

Reviewed by:		kp
Approved by:		kp (mentor)
Fixes:			08ed87a4a2 ("pf: convert DIOCRSETADDRS to netlink")
MFC after:		1 week
Sponsored by:		Rubicon Communications, LLC ("Netgate")
Differential Revision:	https://reviews.freebsd.org/D60174
2026-09-30 19:23:21 -04:00
..
…
2026-09-01 14:49:24 +02:00
2026-04-30 22:35:07 +02:00
2026-09-12 20:07:39 +03:30
…
…
…
2026-09-05 17:44:35 +02:00
2026-05-30 15:43:51 +02:00
2026-05-15 12:13:20 +02:00
2026-07-07 23:16:01 -06:00