]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
bug 452 - fix detection bug for sigs that don't have a content but need payload inspe...
authorAnoop Saldanha <poonaatsoc@gmail.com>
Fri, 20 Apr 2012 05:25:16 +0000 (10:55 +0530)
committerVictor Julien <victor@inliniac.net>
Tue, 24 Apr 2012 11:50:26 +0000 (13:50 +0200)
src/detect.c

index 88bd2544f91513aabfdc03e8e1d54ca3b30460cc..0b11a1e01ed7c6283cb61389d2295cf79ee4fa2d 100644 (file)
@@ -1560,11 +1560,11 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
                         //    continue;
                         //}
 
-                        if (det_ctx->smsg_pmq[pmq_idx].pattern_id_bitarray != NULL) {
+                        //if (det_ctx->smsg_pmq[pmq_idx].pattern_id_bitarray != NULL) {
                             /* filter out sigs that want pattern matches, but
                              * have no matches */
-                            if (!(det_ctx->smsg_pmq[pmq_idx].pattern_id_bitarray[(s->mpm_pattern_id_div_8)] & s->mpm_pattern_id_mod_8) &&
-                                (s->flags & SIG_FLAG_MPM_STREAM) && !(s->flags & SIG_FLAG_MPM_STREAM_NEG)) {
+                            if ((s->flags & SIG_FLAG_MPM_STREAM) && !(s->flags & SIG_FLAG_MPM_STREAM_NEG) &&
+                                !(det_ctx->smsg_pmq[pmq_idx].pattern_id_bitarray[(s->mpm_pattern_id_div_8)] & s->mpm_pattern_id_mod_8)) {
                                 SCLogDebug("no match in this smsg");
                                 continue;
                             }
@@ -1585,7 +1585,7 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
 
                                 break;
                             }
-                        }
+                        //}
                     }
 
                 } /* if (smsg != NULL) */