From: Anoop Saldanha Date: Fri, 1 Mar 2013 14:41:06 +0000 (+0530) Subject: We now assign ids to fp patterns only. Rest of them don't need one. X-Git-Tag: suricata-2.0beta1~207 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e77fd1c883cda1e5023c1a4c9ad166348ded95cd;p=thirdparty%2Fsuricata.git We now assign ids to fp patterns only. Rest of them don't need one. --- diff --git a/src/detect.c b/src/detect.c index 701901396e..751462688e 100644 --- a/src/detect.c +++ b/src/detect.c @@ -4384,9 +4384,6 @@ int SigAddressPrepareStage5(DetectEngineCtx *de_ctx) { int SigGroupBuild(DetectEngineCtx *de_ctx) { Signature *s = NULL; - SigMatch *sm = NULL; - int list_id; - for (s = de_ctx->sig_list; s != NULL; s = s->next) { s->mpm_sm = RetrieveFPForSigV2(s); if (s->mpm_sm != NULL) { @@ -4395,18 +4392,6 @@ int SigGroupBuild(DetectEngineCtx *de_ctx) } } de_ctx->max_fp_id = de_ctx->mpm_pattern_id_store->max_id; - for (s = de_ctx->sig_list; s != NULL; s = s->next) { - for (list_id = 0 ; list_id < DETECT_SM_LIST_MAX; list_id++) { - for (sm = s->sm_lists[list_id]; sm != NULL; sm = sm->next) { - if (sm == s->mpm_sm) - continue; - if (sm->type != DETECT_CONTENT) - continue; - DetectContentData *cd = (DetectContentData *)sm->ctx; - cd->id = DetectPatternGetIdV2(de_ctx->mpm_pattern_id_store, cd, s, SigMatchListSMBelongsTo(s, sm)); - } - } - } /* if we are using single sgh_mpm_context then let us init the standard mpm * contexts using the mpm_ctx factory */