-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Threshold flow/v2 #10550
Threshold flow/v2 #10550
Conversation
Add support for 'by_flow' track option. This allows using the various threshold options in the context of a single flow. Example: alert tcp ... stream-event:pkt_broken_ack; \ threshold:type limit, track by_flow, count 1, seconds 3600; The example would limit the number of alerts to once per hour for packets triggering the 'pkt_broken_ack' stream event. Implemented as a special "flowvar" holding the threshold entries. This means no synchronization is required, making this a cheaper option compared to the other trackers. Ticket: OISF#6822.
Allow rate_filter and thresholds from the global config to specify tracking "by_flow".
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #10550 +/- ##
==========================================
+ Coverage 78.40% 82.67% +4.27%
==========================================
Files 922 922
Lines 246779 247037 +258
==========================================
+ Hits 193488 204250 +10762
+ Misses 53291 42787 -10504
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 18926 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. One question inline.
@@ -35,6 +35,7 @@ enum VarTypes { | |||
VAR_TYPE_FLOW_BIT, | |||
VAR_TYPE_FLOW_INT, | |||
VAR_TYPE_FLOW_VAR, | |||
VAR_TYPE_FLOW_THRESHOLD, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was expecting VarNameStore*
ops corresponding to this but I see nothing. Could you please tell why was this type added?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I will look into it. It seems the current use of these types is a bit inconsistent.
replaced by #10568 |
SV_BRANCH=OISF/suricata-verify#1679
https://redmine.openinfosecfoundation.org/issues/6822
replaces #10544: