]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
flow: add test for community id with same ip
authorPhilippe Antoine <pantoine@oisf.net>
Fri, 18 Jul 2025 14:11:27 +0000 (16:11 +0200)
committerJason Ish <jason.ish@oisf.net>
Fri, 1 Aug 2025 16:51:28 +0000 (10:51 -0600)
Ticket: 5689

tests/community-id-sameip/README.md [new file with mode: 0644]
tests/community-id-sameip/input.pcap [new file with mode: 0644]
tests/community-id-sameip/suricata.yaml [new file with mode: 0644]
tests/community-id-sameip/test.yaml [new file with mode: 0644]

diff --git a/tests/community-id-sameip/README.md b/tests/community-id-sameip/README.md
new file mode 100644 (file)
index 0000000..9cc19d1
--- /dev/null
@@ -0,0 +1,11 @@
+# Test Description
+
+Community ID test when same IP address
+
+# Ticket
+
+https://redmine.openinfosecfoundation.org/issues/5689
+
+# Pcap
+
+From ticket
diff --git a/tests/community-id-sameip/input.pcap b/tests/community-id-sameip/input.pcap
new file mode 100644 (file)
index 0000000..bfc4d79
Binary files /dev/null and b/tests/community-id-sameip/input.pcap differ
diff --git a/tests/community-id-sameip/suricata.yaml b/tests/community-id-sameip/suricata.yaml
new file mode 100644 (file)
index 0000000..df7bcdc
--- /dev/null
@@ -0,0 +1,10 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      community-id: true
+      community-id-seed: 1
+      types:
+        - flow
diff --git a/tests/community-id-sameip/test.yaml b/tests/community-id-sameip/test.yaml
new file mode 100644 (file)
index 0000000..bf43f30
--- /dev/null
@@ -0,0 +1,17 @@
+requires:
+  min-version: 8
+
+args:
+- -k none
+
+checks:
+- filter:
+    count: 1
+    match:
+      community_id: 1:IJQHtzXv/tXud3FtXIufkDsfEd4=
+      dest_ip: 192.168.0.254
+      dest_port: 3306
+      event_type: flow
+      proto: TCP
+      src_ip: 192.168.0.254
+      src_port: 56162