From 35310313def79f5e3344dfc2cf2e2a5ddb92c397 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Mon, 12 Oct 2020 14:19:15 +0200 Subject: [PATCH] detect/http2: inspect API v2 --- src/detect-http2.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/detect-http2.c b/src/detect-http2.c index c73b42e59b..3a986d99cb 100644 --- a/src/detect-http2.c +++ b/src/detect-http2.c @@ -111,12 +111,12 @@ static int g_http2_match_buffer_id = 0; static int g_http2_header_name_buffer_id = 0; static int g_http2_header_buffer_id = 0; -static int DetectEngineInspectHTTP2(ThreadVars *tv, DetectEngineCtx *de_ctx, - DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchData *smd, - Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id) +static int DetectEngineInspectHTTP2(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, + const struct DetectEngineAppInspectionEngine_ *engine, const Signature *s, Flow *f, + uint8_t flags, void *alstate, void *txv, uint64_t tx_id) { - return DetectEngineInspectGenericList(tv, de_ctx, det_ctx, s, smd, - f, flags, alstate, txv, tx_id); + return DetectEngineInspectGenericList( + NULL, de_ctx, det_ctx, s, engine->smd, f, flags, alstate, txv, tx_id); } /** @@ -238,12 +238,10 @@ void DetectHttp2Register(void) DetectBufferTypeRegisterValidateCallback("http2_header", DetectHttp2HeaderValidateCallback); g_http2_header_buffer_id = DetectBufferTypeGetByName("http2_header"); - DetectAppLayerInspectEngineRegister("http2", - ALPROTO_HTTP2, SIG_FLAG_TOSERVER, 0, - DetectEngineInspectHTTP2); - DetectAppLayerInspectEngineRegister("http2", - ALPROTO_HTTP2, SIG_FLAG_TOCLIENT, 0, - DetectEngineInspectHTTP2); + DetectAppLayerInspectEngineRegister2( + "http2", ALPROTO_HTTP2, SIG_FLAG_TOSERVER, 0, DetectEngineInspectHTTP2, NULL); + DetectAppLayerInspectEngineRegister2( + "http2", ALPROTO_HTTP2, SIG_FLAG_TOCLIENT, 0, DetectEngineInspectHTTP2, NULL); g_http2_match_buffer_id = DetectBufferTypeRegister("http2"); DetectUintRegister();