]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Start rule inspect with mask check
authorVictor Julien <victor@inliniac.net>
Fri, 7 Nov 2014 22:43:45 +0000 (23:43 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 4 Apr 2016 16:14:55 +0000 (18:14 +0200)
src/detect.c

index 2c44c8fd56c18d604db894c37bb175d9bad46d86..34ae91b49f36989d5c0d68a6804922d50b20bbe7 100644 (file)
@@ -1514,6 +1514,9 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
 
         SCLogDebug("inspecting signature id %"PRIu32"", s->id);
 
+        if ((s->mask & mask) != s->mask)
+            goto next;
+
         /* if the sig has alproto and the session as well they should match */
         if (likely(sflags & SIG_FLAG_APPLAYER)) {
             if (s->alproto != ALPROTO_UNKNOWN && s->alproto != alproto) {