-
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
Warnint util 4516 v8.1 #7120
Warnint util 4516 v8.1 #7120
Conversation
Ticket: 4516
Ticket: 4516
Ticket: 4516
Codecov Report
@@ Coverage Diff @@
## master #7120 +/- ##
==========================================
- Coverage 78.06% 78.06% -0.01%
==========================================
Files 628 628
Lines 185266 185236 -30
==========================================
- Hits 144635 144602 -33
- Misses 40631 40634 +3
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 6529 |
@@ -580,8 +580,7 @@ void FlowInitConfig(bool quiet) | |||
FatalError(SC_ERR_FATAL, "Invalid value for flow.hash-size: NULL"); | |||
} | |||
|
|||
if (StringParseUint32(&configval, 10, strlen(conf_val), | |||
conf_val) > 0) { | |||
if (StringParseUint32(&configval, 10, (uint16_t)strlen(conf_val), conf_val) > 0) { |
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.
while I'm generally not a fan of size_t
, I wonder if we should use it here as we'd most of the time pass the result of strlen()
?
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.
Done in #7239
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.
Comment inline
Replaced by #7219 |
Implement new `type backoff` for thresholding. This allows alerts to be limited. A count of 1 with a multiplier of 10 would generate alerts for matching packets: 1, 10, 100, 1000, 10000, 100000, etc. A count of 1 with a multiplier of 2would generate alerts for matching packets: 1, 2, 4, 8, 16, 32, etc. Like with other thresholds, rule actions like drop and setting of flowbits will still be performed for each matching packet. Current implementation is only for the by_flow tracker and for per rule threshold statements. Ticket: OISF#7120.
Implement new `type backoff` for thresholding. This allows alerts to be limited. A count of 1 with a multiplier of 10 would generate alerts for matching packets: 1, 10, 100, 1000, 10000, 100000, etc. A count of 1 with a multiplier of 2 would generate alerts for matching packets: 1, 2, 4, 8, 16, 32, etc. Like with other thresholds, rule actions like drop and setting of flowbits will still be performed for each matching packet. Current implementation is only for the by_flow tracker and for per rule threshold statements. Tracking is done using uint32_t. When it reaches this value, the rest of the packets in the tracker will use the silent match. Ticket: OISF#7120.
Link to redmine ticket:
https://redmine.openinfosecfoundation.org/issues/4516
Describe changes:
-Wimplicit-int-conversion
for output, flow, and app-layer filesPart of #7006 as #7107 was
Changed from #7006 to keep using
FlowState
in function prototype and using an explicit cast afterwards to get rid of warning about implicit integer conversion