Skip to content

Commit

Permalink
test: truncated ipv4 test
Browse files Browse the repository at this point in the history
Test that no src_ip, dest_ip are logged instead of just empty strings.

Ticket: https://redmine.openinfosecfoundation.org/issues/7460
  • Loading branch information
jasonish authored and victorjulien committed Jan 8, 2025
1 parent b6bfa2e commit 169fd2f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/ipv4-truncated/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Test that alerts that have unknown IP addresses and ports don't log them.

Ticket: https://redmine.openinfosecfoundation.org/issues/7460
1 change: 1 addition & 0 deletions tests/ipv4-truncated/decoder-events.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
alert pkthdr any any -> any any (msg:"SURICATA IPv4 truncated packet"; decode-event:ipv4.trunc_pkt; classtype:protocol-command-decode; sid:2200003; rev:2;)
9 changes: 9 additions & 0 deletions tests/ipv4-truncated/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
checks:
- filter:
count: 1
match:
event_type: alert
src_ip: null
dest_ip: null
src_port: null
dest_port: null
Binary file added tests/ipv4-truncated/truncated.pcap
Binary file not shown.

0 comments on commit 169fd2f

Please sign in to comment.