]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: template list in engine
authorVictor Julien <victor@inliniac.net>
Sat, 15 Oct 2016 17:26:48 +0000 (19:26 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 16 Feb 2017 09:35:37 +0000 (10:35 +0100)
src/detect-engine-template.c
src/detect-engine.c

index 9ad8ff5936e18713ee7a88d5c404fd8dabd92f67..422a8a3d1e09c7b9519046fcdd00fb0eb7926fc8 100644 (file)
@@ -45,15 +45,13 @@ int DetectEngineInspectTemplateBuffer(ThreadVars *tv,
     int ret = 0;
 
     if (flags & STREAM_TOSERVER && tx->request_buffer != NULL) {
-        ret = DetectEngineContentInspection(de_ctx, det_ctx, s,
-            s->sm_lists[DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH], f,
-            tx->request_buffer, tx->request_buffer_len, 0,
+        ret = DetectEngineContentInspection(de_ctx, det_ctx, s, sm,
+            f, tx->request_buffer, tx->request_buffer_len, 0,
             DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE, NULL);
     }
     else if (flags & STREAM_TOCLIENT && tx->response_buffer != NULL) {
-        ret = DetectEngineContentInspection(de_ctx, det_ctx, s,
-            s->sm_lists[DETECT_SM_LIST_TEMPLATE_BUFFER_MATCH], f,
-            tx->response_buffer, tx->response_buffer_len, 0,
+        ret = DetectEngineContentInspection(de_ctx, det_ctx, s, sm,
+            f, tx->response_buffer, tx->response_buffer_len, 0,
             DETECT_ENGINE_CONTENT_INSPECTION_MODE_STATE, NULL);
     }
 
index ad86cc0c69322131873646940f3545f33e4395c6..b1d4a24cfb46106e1e5ac100eabf5e20ff8817bf 100644 (file)
@@ -206,6 +206,8 @@ int DetectEngineAppInspectionEngine2Signature(Signature *s)
             case DETECT_SM_LIST_CIP_MATCH:
             case DETECT_SM_LIST_ENIP_MATCH:
 
+            case DETECT_SM_LIST_TEMPLATE_BUFFER_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;