Skip to content

Commit

Permalink
tests/decode: Verify unknown ethertype event
Browse files Browse the repository at this point in the history
Issue: 7129
  • Loading branch information
jlucovsky committed Jul 8, 2024
1 parent 118e4f8 commit 635a86e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/decode-unknown-1/test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
requires:
min-version: 7
lt-version: 8

args:
- -k none
Expand Down
14 changes: 14 additions & 0 deletions tests/decode-unknown-2/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
%YAML 1.1
---

outputs:
- eve-log:
enabled: yes
filename: eve.json
filetype: regular
types:
- anomaly:
types:
decode: yes
- stats:
totals: yes
1 change: 1 addition & 0 deletions tests/decode-unknown-2/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alert udp any any -> any any (content:"data|0a 0a|"; startswith; endswith; sid:1;)
22 changes: 22 additions & 0 deletions tests/decode-unknown-2/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
requires:
min-version: 8

args:
- -k none

pcap: ../decode-unknown-1/input.pcap

checks:
- filter:
count: 1
match:
event_type: stats
- stats:
decoder.ethernet: 1
decoder.unknown_ethertype: 1
- filter:
count: 1
match:
event_type: anomaly
anomaly.type: decode
anomaly.event: decoder.ethernet.unknown_ethertype

0 comments on commit 635a86e

Please sign in to comment.