Skip to content
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/v3 #10568

Closed
wants to merge 5 commits into from
Closed

Conversation

victorjulien
Copy link
Member

SV_BRANCH=OISF/suricata-verify#1679

replaces #10550:

  • remove a unused enum addition
  • add a few comments explaining types
  • document a limitation / future todo on var type tracking

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".
Traffic variables (flowvars, flowbits, xbits, etc) use a smaller int for
their type than detection types. As a workaround make sure the values fit
in a uint8_t.
@victorjulien victorjulien mentioned this pull request Mar 4, 2024
@victorjulien victorjulien marked this pull request as draft March 4, 2024 13:13
@victorjulien
Copy link
Member Author

Will investigate the UT error.

@suricata-qa
Copy link

Information: QA ran without warnings.

Pipeline 18970

@victorjulien victorjulien mentioned this pull request Mar 5, 2024
@victorjulien
Copy link
Member Author

Will investigate the UT error.

Turned out to be a nasty one 7f7afcf

@victorjulien
Copy link
Member Author

replaced by #10582

@victorjulien victorjulien deleted the threshold-flow/v3 branch June 23, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants