]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
fast_pattern: don't consider http_method, http_stat_code and http_stat_msg when autom...
authorVictor Julien <victor@inliniac.net>
Thu, 4 Oct 2012 09:48:42 +0000 (11:48 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 4 Oct 2012 09:48:42 +0000 (11:48 +0200)
src/detect-engine-mpm.c

index d921de34ee7712ef7b837d27ec23f30314dca4fa..595dd212568ff1fb346dfeec630fe05e1c879123 100644 (file)
@@ -1720,7 +1720,12 @@ static int PatternMatchPreparePopulateMpm(DetectEngineCtx *de_ctx,
 
                 DetectContentData *cd = (DetectContentData *)sm->ctx;
                 if (!(cd->flags & DETECT_CONTENT_NEGATED) &&
-                    list_id != DETECT_SM_LIST_PMATCH) {
+                    list_id != DETECT_SM_LIST_PMATCH &&
+                    /* don't consider http_method, http_stat_msg, http_stat_code
+                     * to automatically override longest stream match */
+                    list_id != DETECT_SM_LIST_HMDMATCH &&
+                    list_id != DETECT_SM_LIST_HSMDMATCH &&
+                    list_id != DETECT_SM_LIST_HSCDMATCH) {
                     has_non_negated_non_stream_pattern[sig] = 1;
                 }