Download raw body.
pfctl: clear statistic for the address
On 2024/11/20 12:13, Kirill A. Korinsky wrote: > tech@, > > I'd like to propose a patch that adds to pfctl a way to clear statistics for > specified address from the table. > > A usecase for this patch is explained here: > https://marc.info/?l=openbsd-bugs&m=173206758904599&w=2 > > Feedback? Ok? Works as expected for me and I think it makes sense to add. Wait for other comments but FWIW mostly ok sthen. One thing about the manual: > Index: pfctl.8 > =================================================================== > RCS file: /home/cvs/src/sbin/pfctl/pfctl.8,v > diff -u -p -r1.183 pfctl.8 > --- pfctl.8 18 Nov 2022 18:11:10 -0000 1.183 > +++ pfctl.8 20 Nov 2024 11:07:01 -0000 > @@ -517,8 +517,8 @@ Automatically create a persistent table > Show the content (addresses) of a table. > .It Fl T Cm test > Test if the given addresses match a table. > -.It Fl T Cm zero > -Clear all the statistics of a table. > +.It Fl T Cm zero Op Ar address ... > +Clear all the statistics of a table, or only for specified addresses. > .El The "Op Ar address ..." is already shown above for all of these subcommands (and is obviously necessary for -T add, etc), so I don't think it should be listed separately here. It does make me notice that -T show doesn't accept addresses though (which could be useful with -v).
pfctl: clear statistic for the address