Skip to content

Commit

Permalink
tests: add bug 5578 traffic test
Browse files Browse the repository at this point in the history
  • Loading branch information
victorjulien authored and inashivb committed Oct 16, 2023
1 parent bcde646 commit 0379519
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/bug-5578-http-dsize-drop/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Test Description

This test shows that a rule with packet properties should not lead to a flow drop.

## PCAP

Comes from pre-existing test `bug-4663`.

## Related issues

https://redmine.openinfosecfoundation.org/issues/5578
13 changes: 13 additions & 0 deletions tests/bug-5578-http-dsize-drop/suricata.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
%YAML 1.1
---

outputs:
- eve-log:
enabled: yes
filetype: regular
types:
- alert
- drop:
flows: all
alerts: yes
- flow
1 change: 1 addition & 0 deletions tests/bug-5578-http-dsize-drop/test.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
drop http any any -> any any (dsize:0; sid:1;)
30 changes: 30 additions & 0 deletions tests/bug-5578-http-dsize-drop/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
pcap: ../bug-4663/input.pcap

args:
- --simulate-ips

checks:
- filter:
count: 421
match:
event_type: alert
alert.signature_id: 1
- filter:
count: 421
match:
event_type: drop
drop.reason: rules
- filter:
count: 421
match:
event_type: drop
- filter:
count: 0
match:
event_type: flow
flow.action: drop
- filter:
count: 1
match:
event_type: flow
flow.state: closed

0 comments on commit 0379519

Please sign in to comment.