]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect: makes config keyword really require a flow
authorPhilippe Antoine <contact@catenacyber.fr>
Tue, 8 Mar 2022 11:50:16 +0000 (12:50 +0100)
committerShivani Bhardwaj <shivanib134@gmail.com>
Thu, 21 Apr 2022 07:31:56 +0000 (13:01 +0530)
Ticket: 4972

Completes commit c3a220647

DETECT_CONFIG is added as DETECT_SM_LIST_POSTMATCH and not
as DETECT_SM_LIST_MATCH as other keywords handled in SignatureCreateMask

(cherry picked from commit 00da0d3420fd6ebbdbe7990b26eebf7650856eca)

src/detect-engine-build.c

index 9d8f05c98e2ddaf272b0fdf146e5ebf3167d5226..b7b344cbaac2d1ed65e6f10adfbbb391ae414096 100644 (file)
@@ -563,6 +563,11 @@ static int SignatureCreateMask(Signature *s)
             case DETECT_ENGINE_EVENT:
                 s->mask |= SIG_MASK_REQUIRE_ENGINE_EVENT;
                 break;
+        }
+    }
+
+    for (sm = s->init_data->smlists[DETECT_SM_LIST_POSTMATCH]; sm != NULL; sm = sm->next) {
+        switch (sm->type) {
             case DETECT_CONFIG: {
                 DetectConfigData *fd = (DetectConfigData *)sm->ctx;
                 if (fd->scope == CONFIG_SCOPE_FLOW) {