From: Fupeng Zhao Date: Thu, 18 Sep 2025 11:31:26 +0000 (+0000) Subject: tests: add vxlan with non-zero reserved fields test X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e6becd0bfac37cf3ba347c02be6f0a728f084117;p=thirdparty%2Fsuricata-verify.git tests: add vxlan with non-zero reserved fields test Ticket: #7753 --- diff --git a/tests/vxlan-non-zero-reserved-fields/README.md b/tests/vxlan-non-zero-reserved-fields/README.md new file mode 100644 index 000000000..15ad9259c --- /dev/null +++ b/tests/vxlan-non-zero-reserved-fields/README.md @@ -0,0 +1,11 @@ +# Test Description + +Test VXLAN decoding with non-zero reserved fields. + +## PCAP + +Pcap provided by Fupeng Zhao. Manually crafted to reflect [vxlan: Support user-defined reserved bits](https://lwn.net/Articles/998601/). + +## Related issues + +https://redmine.openinfosecfoundation.org/issues/7753 diff --git a/tests/vxlan-non-zero-reserved-fields/input.pcap b/tests/vxlan-non-zero-reserved-fields/input.pcap new file mode 100644 index 000000000..780f30368 Binary files /dev/null and b/tests/vxlan-non-zero-reserved-fields/input.pcap differ diff --git a/tests/vxlan-non-zero-reserved-fields/suricata.yaml b/tests/vxlan-non-zero-reserved-fields/suricata.yaml new file mode 100644 index 000000000..666ed0403 --- /dev/null +++ b/tests/vxlan-non-zero-reserved-fields/suricata.yaml @@ -0,0 +1,24 @@ +%YAML 1.1 +--- + +outputs: + - stats: + enabled: yes + filename: stats.log + append: yes # append to file (yes) or overwrite it (no) + totals: yes # stats for all threads merged together + threads: no # per thread stats + - eve-log: + enabled: yes + filetype: regular #regular|syslog|unix_dgram|unix_stream|redis + filename: eve.json + types: + - http + - stats + - flow + +decoder: + vxlan: + enabled: true + ports: "4789" + reserved-bits-check: permissive diff --git a/tests/vxlan-non-zero-reserved-fields/test.yaml b/tests/vxlan-non-zero-reserved-fields/test.yaml new file mode 100644 index 000000000..8040ade74 --- /dev/null +++ b/tests/vxlan-non-zero-reserved-fields/test.yaml @@ -0,0 +1,25 @@ +requires: + min-version: 9 + +args: + - --set decoder.vxlan.enabled=true + +checks: + - filter: + count: 1 + match: + event_type: flow + src_port: 51252 + dest_port: 80 + flow.pkts_toserver: 5 + flow.pkts_toclient: 5 + - filter: + count: 1 + match: + event_type: flow + dest_port: 4789 + - filter: + count: 1 + match: + event_type: stats + stats.decoder.vxlan: 10