--- /dev/null
+# Description
+
+Test http2.errorcode keyword
+
+# Ticket
+
+https://redmine.openinfosecfoundation.org/issues/7889
+
+# PCAP
+
+The pcap comes from https://github.com/grpc/grpc-node/issues/2744
--- /dev/null
+alert http2 any any -> any any (http2.errorcode:INTERNAL_ERROR; sid:1;)
+alert http2 any any -> any any (http2.errorcode:!NO_ERROR; sid:2;)
+# no match
+alert http2 any any -> any any (http2.errorcode:HTTP_1_1_REQUIRED; sid:3;)
+# new format
+alert http2 any any -> any any (http2.errorcode:HTTP11_REQUIRED; sid:4;)
--- /dev/null
+requires:
+ min-version: 9
+
+# disables checksum verification
+args:
+ - -k none
+
+checks:
+ - filter:
+ count: 2
+ match:
+ event_type: alert
+ alert.signature_id: 1
+ http.http2.request.error_code: INTERNALERROR
+ - filter:
+ count: 2
+ match:
+ event_type: alert
+ alert.signature_id: 2
+ http.http2.request.error_code: INTERNALERROR
+ - filter:
+ count: 0
+ match:
+ event_type: alert
+ alert.signature_id: 3