From e94a7bddb3ef0311fd0c457af68bc4cd1d212b6b Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sat, 15 Oct 2016 19:20:31 +0200 Subject: [PATCH] detect: modbus list in engine --- src/detect-engine-modbus.c | 3 +-- src/detect-engine.c | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/detect-engine-modbus.c b/src/detect-engine-modbus.c index 102ffe39cd..38a0b6876f 100644 --- a/src/detect-engine-modbus.c +++ b/src/detect-engine-modbus.c @@ -200,7 +200,7 @@ int DetectEngineInspectModbus(ThreadVars *tv, DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const Signature *s, - const SigMatch *smi, + const SigMatch *sm, Flow *f, uint8_t flags, void *alstate, @@ -209,7 +209,6 @@ int DetectEngineInspectModbus(ThreadVars *tv, { SCEnter(); ModbusTransaction *tx = (ModbusTransaction *)txv; - SigMatch *sm = s->sm_lists[DETECT_SM_LIST_MODBUS_MATCH]; DetectModbus *modbus = (DetectModbus *) sm->ctx; int ret = 0; diff --git a/src/detect-engine.c b/src/detect-engine.c index 413447a255..f87513107e 100644 --- a/src/detect-engine.c +++ b/src/detect-engine.c @@ -202,6 +202,8 @@ int DetectEngineAppInspectionEngine2Signature(Signature *s) case DETECT_SM_LIST_APP_EVENT: + case DETECT_SM_LIST_MODBUS_MATCH: + new_engine->sm = s->sm_lists[new_engine->sm_list]; s->sm_lists[new_engine->sm_list] = NULL; s->sm_lists_tail[new_engine->sm_list] = NULL;