From: Victor Julien Date: Thu, 23 Jan 2025 15:48:05 +0000 (+0100) Subject: tests: add test for issue 7521 X-Git-Tag: suricata-7.0.9~54 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d0e83b421a2abc5fe8b4e05ead778328b90b917;p=thirdparty%2Fsuricata-verify.git tests: add test for issue 7521 Ticket: #7521. --- diff --git a/tests/iponly-midstream-01/test.rules b/tests/iponly-midstream-01/test.rules new file mode 100644 index 000000000..5fd5494fe --- /dev/null +++ b/tests/iponly-midstream-01/test.rules @@ -0,0 +1,4 @@ +alert tcp 192.168.1.5 any -> 192.168.1.1 any (sid:1;) +alert tcp 192.168.1.1 any -> 192.168.1.5 any (sid:2;) +alert tcp any any -> any any (sid:3;) +alert tcp 192.168.1.0/24 any -> 192.168.1.0/24 any (sid:4;) diff --git a/tests/iponly-midstream-01/test.yaml b/tests/iponly-midstream-01/test.yaml new file mode 100644 index 000000000..661971fc0 --- /dev/null +++ b/tests/iponly-midstream-01/test.yaml @@ -0,0 +1,29 @@ +requires: + min-version: 8 + +args: +- --set stream.midstream=true + +pcap: ../uricontent/detect-uricontent-06/input.pcap + +checks: +- filter: + count: 1 + match: + event_type: alert + alert.signature_id: 1 +- filter: + count: 0 + match: + event_type: alert + alert.signature_id: 2 +- filter: + count: 1 + match: + event_type: alert + alert.signature_id: 3 +- filter: + count: 1 + match: + event_type: alert + alert.signature_id: 4