]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: add rule check for ttl keyword 2717/head
authorOlusegun Fajobi <segzyfaj1@gmail.com>
Mon, 27 Oct 2025 14:13:10 +0000 (15:13 +0100)
committerOlusegun Fajobi <segzyfaj1@gmail.com>
Mon, 27 Oct 2025 14:13:10 +0000 (15:13 +0100)
Related to
Issue: #6310

tests/rules/time_to_live/test.rules [new file with mode: 0644]
tests/rules/time_to_live/test.yaml [new file with mode: 0644]

diff --git a/tests/rules/time_to_live/test.rules b/tests/rules/time_to_live/test.rules
new file mode 100644 (file)
index 0000000..7b172c1
--- /dev/null
@@ -0,0 +1 @@
+alert ip $EXTERNAL_NET any -> $HOME_NET any (msg:"IP Packet With TTL 0"; ttl:0; classtype:misc-activity; sid:1; rev:1;)
diff --git a/tests/rules/time_to_live/test.yaml b/tests/rules/time_to_live/test.yaml
new file mode 100644 (file)
index 0000000..02f03da
--- /dev/null
@@ -0,0 +1,16 @@
+requires:
+  min-version: 9.0.0
+  pcap: false
+
+args:
+  - --engine-analysis
+
+checks:
+  - filter:
+      filename: rules.json
+      count: 1
+      match:
+        id: 1
+        lists.packet.matches[0].name: "ttl"
+        lists.packet.matches[0].ttl.equal: 0
+        
\ No newline at end of file