From: Justin Viiret Date: Mon, 23 May 2016 03:46:24 +0000 (+1000) Subject: app-layer-detect-proto: use mpm-algo X-Git-Tag: suricata-3.1RC1~76 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c6deecc55117d5685e26283661640e02e7005fa;p=thirdparty%2Fsuricata.git app-layer-detect-proto: use mpm-algo Use the matcher configured by the user rather than hard-coding MPM_AC. --- diff --git a/src/app-layer-detect-proto.c b/src/app-layer-detect-proto.c index c9b2a5e33e..fb25b5b352 100644 --- a/src/app-layer-detect-proto.c +++ b/src/app-layer-detect-proto.c @@ -1528,6 +1528,8 @@ int AppLayerProtoDetectSetup(void) memset(&alpd_ctx, 0, sizeof(alpd_ctx)); uint16_t spm_matcher = SinglePatternMatchDefaultMatcher(); + uint16_t mpm_matcher = PatternMatchDefaultMatcher(); + alpd_ctx.spm_global_thread_ctx = SpmInitGlobalThreadCtx(spm_matcher); if (alpd_ctx.spm_global_thread_ctx == NULL) { SCLogError(SC_ERR_FATAL, "Unable to alloc SpmGlobalThreadCtx."); @@ -1536,7 +1538,7 @@ int AppLayerProtoDetectSetup(void) for (i = 0; i < FLOW_PROTO_DEFAULT; i++) { for (j = 0; j < 2; j++) { - MpmInitCtx(&alpd_ctx.ctx_ipp[i].ctx_pm[j].mpm_ctx, MPM_AC); + MpmInitCtx(&alpd_ctx.ctx_ipp[i].ctx_pm[j].mpm_ctx, mpm_matcher); } } SCReturnInt(0);