Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devel/php-pfSense-module: Correct pfSense_pf_cp_zerocnt. Fixes #13838
There are a few errors in pfSense_pf_cp_zerocnt: * In the loop resetting eth rule counters, the wrong structure 'info' was referenced for the number of rules and for the ticket. As a result, no eth rule statistics are cleared. This is corrected. * if_rulesets was indexed by the wrong counter nr, where nrs is the counter iterating over the number of elements of if_rulesets. This is corrected. * pfctl_get_clear_rule() used enums PF_RULESET_* to nominate rulesets to be cleared. On examining how pfctl clears counters using pfctl_get_clear_rule() it appears this is incorrect, and the user interface enums for identifying rulesets for zeroing are only PF_PASS and PF_SCRUB (which are the only rulesets which have counters at this time). pfSense_pf_cp_zerocnt() is modified to clear rulesets identified by these enums. There are currently no layer three counters associated with captive portal rule anchors, so this has no effect at this time but is corrected for future use.
- Loading branch information