SCReturn;
}
+bool g_config_http1keywords_http2traffic = false;
+
int AppLayerParserSetup(void)
{
SCEnter();
memset(&alp_ctx, 0, sizeof(alp_ctx));
+ int value = 0;
+ if (ConfGetBool("app-layer.protocols.http2.http1-rules", &value) == 1 && value == 1) {
+ g_config_http1keywords_http2traffic = true;
+ }
SCReturnInt(0);
}
return ((a > ALPROTO_UNKNOWN && a < ALPROTO_FAILED));
}
+extern bool g_config_http1keywords_http2traffic;
+
// wether a signature AppProto matches a flow (or signature) AppProto
static inline bool AppProtoEquals(AppProto sigproto, AppProto alproto)
{
- if (alproto == ALPROTO_HTTP2 && sigproto == ALPROTO_HTTP) {
- // TODO config option
+ if (alproto == ALPROTO_HTTP2 && g_config_http1keywords_http2traffic &&
+ sigproto == ALPROTO_HTTP) {
return true;
}
return (sigproto == alproto);