]> git.ipfire.org Git - thirdparty/suricata.git/commit
detect/threshold: Refactor threshold calculation to handle by_rule and by_both.
authorTodd Mortimer <todd@opennet.ca>
Mon, 30 Mar 2020 23:45:50 +0000 (23:45 +0000)
committerVictor Julien <victor@inliniac.net>
Tue, 7 Apr 2020 05:40:51 +0000 (07:40 +0200)
commit82dc61f4c3e3e845e752dde05da3dfbe0e7a5e25
tree03cb0d4fff218d76844812bf45db24cf92299b3d
parent9fafc1031c0c9c11e5d98a286535b6b18af7cd3d
detect/threshold: Refactor threshold calculation to handle by_rule and by_both.

The only difference between threshold calculations for by_src/by_dst,
by_rule or by_both is which table stores the DetectThresholdEntry.
Refactor the ThresholdHandlePacket* functions to do table lookup and
storage individually, but calculate thresholds in a common function.
src/detect-engine-threshold.c
src/detect-threshold.h