tests: detection_filter unique_on IPs - v2#2924
Open
oferda4 wants to merge 1 commit intoOISF:masterfrom
Open
Conversation
Add test coverage for the new detection_filter option unique_on, for dst_ip and src_ip (both IPv4 and IPv6). Tests added: - detection_filter-distinct-dstip: validates distinct dst_ip counting triggers alert when threshold exceeded - detection_filter-distinct-dstip-no-dups: validates no alert when distinct dst_ip count stays below threshold - detection_filter-distinct-srcip: validates distinct src_ip counting triggers alert when threshold exceeded - detection_filter-distinct-srcip-no-dups: validates no alert when distinct src_ip count stays below threshold - detection_filter-distinct-dstip6: validates dst_ip counting with IPv6 - detection_filter-distinct-srcip6: validates src_ip counting with IPv6 - detection_filter-distinct-dstip-higher-threshold: validates logic with count > 1 (count 3, 4 distinct IPs) Uses ICMP/ICMPv6 to demonstrate that IP-based unique_on works with any protocol (unlike port-based unique_on which requires tcp/udp/sctp). Ticket: #8250
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add test coverage for the new detection_filter option unique_on, for dst_ip and src_ip (both IPv4 and IPv6).
Tests added:
Uses ICMP/ICMPv6 to demonstrate that IP-based unique_on works with any protocol (unlike port-based unique_on which requires tcp/udp/sctp).
v2:
- detection_filter-distinct-dstip-higher-threshold: validates logic with count > 1 (count 3, 4 distinct IPs)
Previous PR: #2890
Ticket: https://redmine.openinfosecfoundation.org/issues/8250
Suricata PR: OISF/suricata#14853