]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
tests: update for exceptions stats counters master 2608/head 2620/head
authorJuliana Fajardini <jufajardini@oisf.net>
Tue, 24 Jun 2025 19:01:11 +0000 (16:01 -0300)
committerJuliana Fajardini <jufajardini@oisf.net>
Tue, 19 Aug 2025 14:59:41 +0000 (11:59 -0300)
Related to backport ticket
Task #6509

48 files changed:
tests/exception-policy-applayer-01/suricata.yaml
tests/exception-policy-applayer-01/test.yaml
tests/exception-policy-applayer-02/suricata.yaml
tests/exception-policy-applayer-02/test.yaml
tests/exception-policy-applayer-03/suricata.yaml
tests/exception-policy-applayer-03/test.yaml
tests/exception-policy-default-01/suricata.yaml
tests/exception-policy-default-01/test.yaml
tests/exception-policy-default-03/suricata.yaml
tests/exception-policy-default-03/test.yaml
tests/exception-policy-defrag-01/suricata.yaml
tests/exception-policy-defrag-01/test.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-01/suricata.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-01/test.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-04/suricata.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-04/test.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-06/suricata.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-06/test.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-07/suricata.yaml
tests/exception-policy-master-switch/exception-policy-master-switch-07/test.yaml
tests/exception-policy-midstream-01/suricata.yaml
tests/exception-policy-midstream-01/test.yaml
tests/exception-policy-midstream-02/suricata.yaml
tests/exception-policy-midstream-02/test.yaml
tests/exception-policy-midstream-04/suricata.yaml
tests/exception-policy-midstream-04/test.yaml
tests/exception-policy-midstream-05/suricata.yaml
tests/exception-policy-midstream-05/test.yaml
tests/exception-policy-midstream-06/suricata.yaml
tests/exception-policy-midstream-06/test.yaml
tests/exception-policy-reject-action-01/suricata.yaml
tests/exception-policy-reject-action-01/test.yaml
tests/exception-policy-simulated-flow-memcap/suricata.yaml
tests/exception-policy-simulated-flow-memcap/test.yaml
tests/exception-policy-stream-reassembly-memcap-01/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-01/test.yaml
tests/exception-policy-stream-reassembly-memcap-02/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-02/test.yaml
tests/exception-policy-stream-reassembly-memcap-03/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-03/test.yaml
tests/exception-policy-stream-reassembly-memcap-04/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-04/test.yaml
tests/exception-policy-stream-reassembly-memcap-05/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-05/test.yaml
tests/exception-policy-stream-reassembly-memcap-06/suricata.yaml
tests/exception-policy-stream-reassembly-memcap-06/test.yaml
tests/exception-policy-stream-ssn-memcap-01/suricata.yaml
tests/exception-policy-stream-ssn-memcap-01/test.yaml

index f78de69fee31b56442d7c267d6a1237e91c8be1d..0f00268ae1d417022cb54466907f88a33ce55337 100644 (file)
@@ -4,6 +4,8 @@
 stats:
   enabled: yes
   interval: 8
+  exception-policy:
+    global-stats: true
 
 outputs:
   - eve-log:
index 35c8f7f256b8645c8522cf580118462989d1658f..77b3b4b275a6e27cf6aaff2c742425d3aa54b529 100644 (file)
@@ -53,12 +53,13 @@ checks:
         event_type: stats
         stats.ips.drop_reason.applayer_error: 1
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
         stats.exception_policy.app_layer.error.drop_flow: 1
         stats.exception_policy.app_layer.error.pass_flow: 0
+        not-has-key: stats.app_layer.error.tls.exception_policy.drop_flow
   - filter:
       min-version: 8
       count: 1
index aedf26e36ce2081a38e56d6af96695dd475e0ef7..d4e88fb3e54f0affb892b8df3e451f1f26ff390d 100644 (file)
@@ -37,4 +37,5 @@ stats:
   enabled: yes
   interval: 8
   exception-policy:
+    global-stats: true
     per-app-proto-errors: true
index a45b97e5abec34b124363326a255f6c5cf041c62..774f5fc4ea90aecf2a2f564d208c1871023e1463 100644 (file)
@@ -42,12 +42,13 @@ checks:
         event_type: flow
         flow.action: drop
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
         stats.app_layer.error.tls.exception_policy.pass_packet: 1
         stats.app_layer.error.tls.exception_policy.drop_packet: 0
+        stats.exception_policy.app_layer.error.pass_packet: 1
   - filter:
       min-version: 8
       count: 1
index 2f6b63692e6a4e737f49e68be05b09c06ad3d9ca..cc8b6a128ec4b6558ab675957e67026822a56d7e 100644 (file)
@@ -41,4 +41,5 @@ stats:
   enabled: yes
   interval: 8
   exception-policy:
+    global-stats: true
     per-app-proto-errors: true
index 62d916e016b3b367efae6af398471d65c7052322..2865997227706108e4321e1907219d1441b07c54 100644 (file)
@@ -1,5 +1,5 @@
 requires:
-  min-version: 8
+  min-version: 7.0.12
   features:
     - DEBUG
 pcap: ../bittorrent-dht/input.pcap
@@ -72,6 +72,7 @@ checks:
       stats.exception_policy.app_layer.error.pass_packet: 1
       stats.exception_policy.app_layer.error.drop_packet: 0
 - filter:
+    min-version: 8
     count: 1
     match:
       event_type: flow
index a84c700553fe53176a65fa17a3b91fb3e622ca57..a582aac66070edada1aaa7b5f2a1f4890d9d319e 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 4391585aec4bf19645e2f99ac0d323b5ad70418b..a1f731d091a737f35231024fac6092ad16b0280f 100644 (file)
@@ -29,3 +29,9 @@ checks:
         event_type: flow
         not-has-key: flow.exception_policy[0].target
         not-has-key: flow.exception_policy[0].policy
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        not-has-key: stats.exception_policy
index 1c39e6c379c40fec44f1ddd35cce951b3bef5f18..5a86dcd0f7bd21f8516d7c140f2e7440df36b152 100644 (file)
@@ -1,6 +1,9 @@
 %YAML 1.1
 ---
 
+stats:
+  enabled: true
+
 outputs:
   - eve-log:
       enabled: yes
@@ -23,6 +26,7 @@ outputs:
               header: X-Forwarded-For
         - flow
         - http
+        - stats
         - drop:
             alerts: yes
             flows: all
index c244dda35a30bb7d78a0a324849b3c2a1fec11e4..2cddd8c162aeb78eb8882af832574e40882bfceb 100644 (file)
@@ -43,3 +43,17 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_midstream"
         flow.exception_policy[0].policy: "drop_flow"
+  - filter:
+      min-version: 8
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.midstream.drop_flow: 1
+  # in Suricata 7, the exception policy stats counters can be disabled
+  - filter:
+      min-version: 7.0.12
+      lt-version: 8
+      count: 1
+      match:
+        event_type: stats
+        not-has-key: stats.exception_policy
index aa46e9763db8e3a36d9fafbc42727277508111a3..ed429c88261faa8d35ea475015e80b43d57c52bc 100644 (file)
@@ -22,6 +22,10 @@ outputs:
         - flow
         - stats
 
+stats:
+  exception-policy:
+    global-stats: true
+
 action-order:
   - pass
   - drop
index 9c0ceabf5f5340b3a4b8f67d7ccf52f4a464c350..2750a7ff0e975f06dc96815e1e7d2f3bf8eac7d1 100644 (file)
@@ -39,7 +39,7 @@ checks:
         event_type: stats
         stats.ips.drop_reason.defrag_memcap: 1
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
index c615582f87cefe4cd62d6cc68478e4085681e16e..db6536fe9311be5c5ec53293ab89e526570f2cd9 100644 (file)
@@ -34,3 +34,7 @@ outputs:
        filename: stats.log
        append: yes
 
+stats:
+  exception-policy:
+    global-stats: true
+
index acc59148cba4e6aa4269a7014c329e5c3fc9bf55..e072344d61520f1125215b92fa1d4b105cc50907 100644 (file)
@@ -43,7 +43,7 @@ checks:
         flow.exception_policy[0].target: "stream_midstream"
         flow.exception_policy[0].policy: "drop_flow"
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
index 1f3898223449489b5dbc800f863ef8641a5b6562..07c57894243ca5d78c4db44051600ac00eb82ae3 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
@@ -23,6 +27,7 @@ outputs:
               header: X-Forwarded-For
         - flow
         - http
+        - stats
         - drop:
             alerts: yes
             flows: all
index eeb36937d80952c3ea8e572e87a9fd48763450ff..b907f784c0701d6bb4154aae6db729d8669069e9 100644 (file)
@@ -33,3 +33,9 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_midstream"
         flow.exception_policy[0].policy: "pass_flow"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.midstream.pass_flow: 1
index 17e07b85a07b925df5afa37feaf6c7d822bd83c3..8a29066ec7ac91384e424d56b87ed177119b12dd 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
@@ -23,6 +27,7 @@ outputs:
               header: X-Forwarded-For
         - flow
         - http
+        - stats
         - drop:
             alerts: yes
             flows: all
index 756bfb638edd67d08e30ac12be0d42e9176bcb91..79cd4cced5c17f9b767a5dcb562c96d78eb11ca2 100644 (file)
@@ -43,3 +43,10 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_midstream"
         flow.exception_policy[0].policy: "ignore"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.reassembly.drop_flow: 0
+        not-has-key: stats.exception_policy.tcp.midstream
index bd9e2147b32844c248197333e6d4f24cb26e5c77..c5bbe3e8a8d80db97ca077c7c2fd1f5f63419de5 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
@@ -23,6 +27,7 @@ outputs:
               header: X-Forwarded-For
         - flow
         - http
+        - stats
         - drop:
             alerts: yes
             flows: all
index 756bfb638edd67d08e30ac12be0d42e9176bcb91..6a59a209c111f2e4efa2e0d8467bcfac690f7268 100644 (file)
@@ -43,3 +43,10 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_midstream"
         flow.exception_policy[0].policy: "ignore"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        not-has-key: stats.exception_policy.tcp.midstream
+
index 6ffa252bb5f28230f64d8dd085b81b62fb2c295b..9d62a8033396d7d718dd32649171475e016a81bd 100644 (file)
@@ -3,6 +3,8 @@
 
 stats:
   enabled: yes
+  exception-policy:
+    global-stats: true
 
 outputs:
   - eve-log:
index 26fbcf3b9667e41efe945b1d2a9a66512640329f..05a9a9b7078e396e5e6b1b46302cd7e9fb900f24 100644 (file)
@@ -19,7 +19,7 @@ checks:
       match:
         event_type: http
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
index c390fff3b79ef101673a517e8b271b436d42dd04..b463dd27c78ac12f64778bc4ed213ed76fd597d7 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 9b8caa0542cbb4b1c7ded90a9e1e209c0d1edcf0..2c69d095483d6ded838dfcceb08e7ae7c4e7b832 100644 (file)
@@ -31,7 +31,7 @@ checks:
         event_type: stats
         stats.ips.drop_reason.stream_midstream: 1
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
index e318821f82fdaaaced440abec0a39effe7fd9da4..bf3a180c2de43357f13f29236cef6085f649bafc 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 0b71f0462dd35eddfb393c7052fcdc5c85609a4e..e47c1333d379be42ce59cc576b59661766aaa2c8 100644 (file)
@@ -20,7 +20,7 @@ checks:
     match:
       event_type: http
 - filter:
-    min-version: 8
+    min-version: 7.0.12
     count: 1
     match:
       event_type: stats
index 64b32f334c5cd99363fcdfb270935ebc6a3a611c..b994fe2b7e3d9ab09b039b92cef10af6e083eb87 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 56304546ca9c63cdc760fe0acef6184333631bce..4fbba7bead161a421e730890d395ee28ccc6cf16 100644 (file)
@@ -19,7 +19,7 @@ checks:
       match:
         event_type: http
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
index ca0134c6bab758062405ab5792c1ba7b1642b5ca..4f94ed11e30bf0c90a849bc0d04260037758f001 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 03122264ca4050b262df908a60d3d4b352be6afe..084613b0f37fb18d5a9b05a81e9b1788e4a5bff0 100644 (file)
@@ -17,7 +17,7 @@ checks:
         event_type: flow
         flow.action: drop
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
index d672946e9cfae960a76253998b7cc4fcc62a99e8..d8f4722e9f0b35da2b1be4e9899f66c30b9d26d2 100644 (file)
@@ -8,6 +8,11 @@ outputs:
         - alert:
         - flow
         - http
+        - stats
         - drop:
             alerts: yes
             flows: all
+
+stats:
+  exception-policy:
+    global-stats: true
index 5809415d0eb7d2f4df17282d8bb07d0ade1bad3b..a1cda30d1bf2f9fa876f7bb33934c926b8e72d87 100644 (file)
@@ -25,3 +25,9 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_midstream"
         flow.exception_policy[0].policy: "reject"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.midstream.reject: 1
index 6baf208c7d18ed873b6ebe4b4b52dabf53767836..e9aab5f9a25085a964fca1a9a3e37ac986f9fe54 100644 (file)
@@ -3,6 +3,8 @@
 
 stats:
   enabled: yes
+  exception-policy:
+    global-stats: true
 
 outputs:
   - eve-log:
index d297e0d28d5954c4cd428b81cccf1fb195885525..56fac5be2806f45df23d77cd65f45a846ec53ce0 100644 (file)
@@ -33,7 +33,7 @@ checks:
         event_type: stats
         stats.ips.drop_reason.flow_memcap: 1
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
index 1c09123ac50d140bece77c34e4cdfa59e6a69f35..30bc85d7124b790955bdc9a55032c2802ebcb1af 100644 (file)
@@ -3,6 +3,8 @@
 
 stats:
   enabled: yes
+  exception-policy:
+    global-stats: true
 
 outputs:
   - eve-log:
index 8e59d36b721e5312218ba17a9bf45f8a1c30accf..ad59cf1c8f267d30203ffec7d57fe2ac59f0e84b 100644 (file)
@@ -48,10 +48,12 @@ checks:
         event_type: flow
         flow.action: drop
   - filter:
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
         stats.ips.drop_reason.stream_reassembly: 1
+        stats.exception_policy.tcp.reassembly.drop_flow: 1
   - filter:
       min-version: 8
       count: 1
index dfccb8afa643b645d9977f7c442e1fc612fbbf3b..67c3f4f342a86c65f06bb7cb816ef7433c20f1e0 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
@@ -20,6 +24,7 @@ outputs:
             flows: all       # start or all: 'start' logs only a single drop
                              # per flow direction. All logs each dropped pkt.
         - flow
+        - stats
 action-order:
   - pass
   - drop
index 0a027ae1985d5c05a064614bff8804aeb0ac25a7..95e257d04adf7b1dea7db67c879b3c06a9f61ce8 100644 (file)
@@ -41,3 +41,10 @@ checks:
         flow.exception_policy[0].policy: "pass_flow"
         flow.exception_policy[1].target: "app_layer_error"
         flow.exception_policy[1].policy: "ignore"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.reassembly.pass_flow: 1
+        not-has-key: stats.app_layer.error.tls.exception_policy
index dfccb8afa643b645d9977f7c442e1fc612fbbf3b..ed429c88261faa8d35ea475015e80b43d57c52bc 100644 (file)
@@ -20,6 +20,12 @@ outputs:
             flows: all       # start or all: 'start' logs only a single drop
                              # per flow direction. All logs each dropped pkt.
         - flow
+        - stats
+
+stats:
+  exception-policy:
+    global-stats: true
+
 action-order:
   - pass
   - drop
index 6756a2ee15a2c868a291dbbb8d72e92efa5ecb83..0ceed1d6a41dd35b20aa3c0988a29ac9b4bd3994 100644 (file)
@@ -37,3 +37,9 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_reassembly_memcap"
         flow.exception_policy[0].policy: "bypass"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.reassembly.bypass: 1
index aac4c605a75d949de9d4deed8eab8097d9cb7d3a..6262115447796c7dd45ac939fc7cf3f06117a362 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 8e59d36b721e5312218ba17a9bf45f8a1c30accf..d13ce3bdfeec1c97cd2fa62282d608a987480d13 100644 (file)
@@ -59,3 +59,9 @@ checks:
         event_type: flow
         flow.exception_policy[0].target: "stream_reassembly_memcap"
         flow.exception_policy[0].policy: "drop_flow"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.reassembly.drop_flow: 1
index aac4c605a75d949de9d4deed8eab8097d9cb7d3a..6262115447796c7dd45ac939fc7cf3f06117a362 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 70a1e56fbf6b205ece4724994af6c16108c973cb..7ffe07f20c5dc27c61a383d60fc1b883bc2c21b2 100644 (file)
@@ -62,3 +62,10 @@ checks:
         flow.exception_policy[0].policy: "drop_packet"
         flow.exception_policy[1].target: "app_layer_error"
         flow.exception_policy[1].policy: "ignore"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.reassembly.drop_packet: 1
+        not-has-key: stats.exception_policy.app_layer.error
index 8894da2d280ccb81d2120c78be72293ddd1f85ea..37a8865a9d5d680e98126a624f92478be065c25d 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index ab4c833c48775325fc32a8ae9862ce10fc17d0c9..e34e39cd2a7379f2cbab36dc9d0b897aeef87c1c 100644 (file)
@@ -48,7 +48,7 @@ checks:
         event_type: flow
         flow.action: drop
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats
@@ -62,3 +62,10 @@ checks:
         flow.exception_policy[0].policy: "pass_packet"
         flow.exception_policy[1].target: "app_layer_error"
         flow.exception_policy[1].policy: "ignore"
+  - filter:
+      min-version: 7.0.12
+      count: 1
+      match:
+        event_type: stats
+        stats.exception_policy.tcp.reassembly.pass_packet: 1
+        not-has-key: stats.exception_policy.app_layer.error
index aa46e9763db8e3a36d9fafbc42727277508111a3..73c956016d80ab643c334883a71daad142abebf2 100644 (file)
@@ -1,6 +1,10 @@
 %YAML 1.1
 ---
 
+stats:
+  exception-policy:
+    global-stats: true
+
 outputs:
   - eve-log:
       enabled: yes
index 2fbb4b9b22e04acd75ed162a70e1d60dbbb9c14f..4726fa032d7e7bd6d767d6b5d1bd415a073ced14 100644 (file)
@@ -52,7 +52,7 @@ checks:
         event_type: stats
         stats.ips.drop_reason.stream_memcap: 1
   - filter:
-      min-version: 8
+      min-version: 7.0.12
       count: 1
       match:
         event_type: stats