]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
detect/flow: don't require flow for direction options
authorVictor Julien <victor@inliniac.net>
Mon, 30 Jul 2018 19:01:05 +0000 (21:01 +0200)
committerVictor Julien <victor@inliniac.net>
Thu, 21 Mar 2019 18:19:04 +0000 (19:19 +0100)
Flow isn't directly used for direction checks, so don't require
a flow to be present.

src/detect-flow.c

index 118ca2af5dc9deae70a39b9ac8cc1aee336d5356..703930bc5e501842c8acc8a9577dc5540125d9ca 100644 (file)
@@ -392,6 +392,11 @@ int DetectFlowSetup (DetectEngineCtx *de_ctx, Signature *s, const char *flowstr)
     }
     if (fd->flags & DETECT_FLOW_FLAG_NOSTREAM) {
         s->flags |= SIG_FLAG_REQUIRE_PACKET;
+    } else if (fd->flags == DETECT_FLOW_FLAG_TOSERVER ||
+               fd->flags == DETECT_FLOW_FLAG_TOCLIENT)
+    {
+        // no direct flow is needed for just direction
+
     } else {
         s->init_data->init_flags |= SIG_FLAG_INIT_FLOW;
     }