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);
}
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;