From ae5537a795786b445e71bf3287eb804ead2b6c1c Mon Sep 17 00:00:00 2001 From: Anoop Saldanha Date: Fri, 20 Apr 2012 10:55:16 +0530 Subject: [PATCH 1/2] bug 452 - fix detection bug for sigs that don't have a content but need payload inspection --- src/detect.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/detect.c b/src/detect.c index df2bdca..f1467b3 100644 --- a/src/detect.c +++ b/src/detect.c @@ -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) */ -- 1.7.1