]> git.ipfire.org Git - thirdparty/suricata-verify.git/commitdiff
Added test to validate the pppoe decoder can handle an 8 bit protocol field.
authorSteven Ottenhoff <steven@mmox.nl>
Thu, 13 Jan 2022 14:47:38 +0000 (14:47 +0000)
committerJason Ish <jason.ish@oisf.net>
Fri, 29 Apr 2022 17:52:35 +0000 (11:52 -0600)
Redmine https://redmine.openinfosecfoundation.org/issues/4810

tests/bug-4810/README.md [new file with mode: 0644]
tests/bug-4810/pppoe-session-http.pcap [new file with mode: 0644]
tests/bug-4810/suricata.yaml.bkp [new file with mode: 0644]
tests/bug-4810/test.yaml [new file with mode: 0644]

diff --git a/tests/bug-4810/README.md b/tests/bug-4810/README.md
new file mode 100644 (file)
index 0000000..f147add
--- /dev/null
@@ -0,0 +1,4 @@
+# Description
+
+Test if 8 bit protocol fields are correctly handled by pppoe decoder
+by identifying the http payload.
diff --git a/tests/bug-4810/pppoe-session-http.pcap b/tests/bug-4810/pppoe-session-http.pcap
new file mode 100644 (file)
index 0000000..90a24d3
Binary files /dev/null and b/tests/bug-4810/pppoe-session-http.pcap differ
diff --git a/tests/bug-4810/suricata.yaml.bkp b/tests/bug-4810/suricata.yaml.bkp
new file mode 100644 (file)
index 0000000..1987f04
--- /dev/null
@@ -0,0 +1,11 @@
+%YAML 1.1
+---
+
+outputs:
+  - eve-log:
+      enabled: yes
+      filetype: regular
+      filename: eve.json
+      types:
+        - http:
+            dump-all-headers: both
diff --git a/tests/bug-4810/test.yaml b/tests/bug-4810/test.yaml
new file mode 100644 (file)
index 0000000..37c86c9
--- /dev/null
@@ -0,0 +1,14 @@
+requires:
+  min-version: 5.0.0
+
+checks:
+  # Correctly identify the http header in the pppoe payload with a 
+  # 8 bit ppp protocol field
+  - filter:
+      count: 1
+      match:
+        event_type: http
+        http.status: 200
+        http.http_method: "GET"
+        http.url: "/"