]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
prefilter/multibuf: test with multiple packets 2118/head
authorPhilippe Antoine <pantoine@oisf.net>
Tue, 15 Oct 2024 12:41:16 +0000 (14:41 +0200)
committerVictor Julien <victor@inliniac.net>
Tue, 5 Nov 2024 10:39:54 +0000 (11:39 +0100)
Ticket: 7326

tests/prefilter-multibuf-multipkts/README.md [new file with mode: 0644]
tests/prefilter-multibuf-multipkts/input.pcap [new file with mode: 0644]
tests/prefilter-multibuf-multipkts/test.rules [new file with mode: 0644]
tests/prefilter-multibuf-multipkts/test.yaml [new file with mode: 0644]

diff --git a/tests/prefilter-multibuf-multipkts/README.md b/tests/prefilter-multibuf-multipkts/README.md
new file mode 100644 (file)
index 0000000..bfc4b75
--- /dev/null
@@ -0,0 +1,12 @@
+Test
+====
+
+Test that multibuffer is prefiltered the right way, even if occurences of buffers
+are spanned over multiple packets, and the first try does not match.
+
+https://redmine.openinfosecfoundation.org/issues/7326
+
+PCAP
+====
+
+Pcap crafted with some http server and some python client that delays or not the writing of the headers
diff --git a/tests/prefilter-multibuf-multipkts/input.pcap b/tests/prefilter-multibuf-multipkts/input.pcap
new file mode 100644 (file)
index 0000000..e8a2a07
Binary files /dev/null and b/tests/prefilter-multibuf-multipkts/input.pcap differ
diff --git a/tests/prefilter-multibuf-multipkts/test.rules b/tests/prefilter-multibuf-multipkts/test.rules
new file mode 100644 (file)
index 0000000..b903323
--- /dev/null
@@ -0,0 +1,2 @@
+alert http any any -> any any ( sid: 2; http.stat_code; content: "200"; fast_pattern; http.response_header; content: "first";)
+alert http any any -> any any ( sid: 3; http.stat_code; content: "200"; http.response_header; content: "first"; fast_pattern;)
diff --git a/tests/prefilter-multibuf-multipkts/test.yaml b/tests/prefilter-multibuf-multipkts/test.yaml
new file mode 100644 (file)
index 0000000..78bc76f
--- /dev/null
@@ -0,0 +1,17 @@
+requires:
+  min-version: 8
+
+args:
+- -k none
+
+checks:
+- filter:
+    count: 1
+    match:
+      event_type: alert
+      alert.signature_id: 2
+- filter:
+    count: 1
+    match:
+      event_type: alert
+      alert.signature_id: 3