]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
We now assign ids to fp patterns only. Rest of them don't need one.
authorAnoop Saldanha <anoopsaldanha@gmail.com>
Fri, 1 Mar 2013 14:41:06 +0000 (20:11 +0530)
committerVictor Julien <victor@inliniac.net>
Wed, 20 Mar 2013 12:07:18 +0000 (13:07 +0100)
src/detect.c

index 701901396e84e16c66ec5cd7f6ee859d436e3985..751462688ea8bf6f7ee793573e71c2ccaac0a1a9 100644 (file)
@@ -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 */