suricata
suricata copied to clipboard
exception/policy: add stats counters - v4
Link to redmine ticket: https://redmine.openinfosecfoundation.org/issues/5816
Previous PR: https://github.com/OISF/suricata/pull/10264
Disclaimer:
this code triggers a stack use after scope
error related, I think, to how I'm trying to "automate" the counter ids registration. I'll point out in the code
Describe changes:
- encode valid exception policy stats
- extract exception policy types to its own header file
- start documenting exception policy stats counters
- better highlight what exception policies are valid with which exception scenarios
- try to use array and struct for Exception Policy Counters
TODO:
- carefully review if we are not trying to log counters for cases when exception policies are not valid (such as specific situations in IDS or IPS).
- figure out how to apply same logic used for other stats counters for per-app-proto app-layer error exception policy stats
- better align stats.log - as the new counters size character is longer than what we currently have in the stats
- update the json.schema to include delta counters
- fix commit history
ERROR: ERROR: ASAN TEST FAIL in ASAN_TLPR1_suri QA test
ERROR: QA failed on ASAN_TLPR1_suri.
Pipeline 18332
Followed by: https://github.com/OISF/suricata/pull/10527