detect: template list in engine

pull/2559/head
Victor Julien 9 years ago
parent da7c816c7c
commit a0fe67a3c0

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

@ -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;

Loading…
Cancel
Save