From: Victor Julien Date: Mon, 30 Jul 2018 19:01:05 +0000 (+0200) Subject: detect/flow: don't require flow for direction options X-Git-Tag: suricata-5.0.0-beta1~137 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d5baac3f8507450e44284e0200f52a1f702c7472;p=thirdparty%2Fsuricata.git detect/flow: don't require flow for direction options Flow isn't directly used for direction checks, so don't require a flow to be present. --- diff --git a/src/detect-flow.c b/src/detect-flow.c index 118ca2af5d..703930bc5e 100644 --- a/src/detect-flow.c +++ b/src/detect-flow.c @@ -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; }