From 026a4efc571b4d0c41f4854a33fb1e6a2e8ccd21 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 6 Jan 2012 19:02:02 +0100 Subject: [PATCH] Make sure that continued stateful detection only inspects sigs in the proper direction. --- src/detect-engine-state.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/detect-engine-state.c b/src/detect-engine-state.c index 721dc64715..8afe7da8c4 100644 --- a/src/detect-engine-state.c +++ b/src/detect-engine-state.c @@ -755,6 +755,12 @@ int DeStateDetectContinueDetection(ThreadVars *tv, DetectEngineCtx *de_ctx, Dete } } + /* only inspect in the right direction here */ + if (flags & STREAM_TOSERVER && !(s->flags & SIG_FLAG_TOSERVER)) + continue; + else if (flags & STREAM_TOCLIENT && !(s->flags & SIG_FLAG_TOCLIENT)) + continue; + RULE_PROFILING_START; /* let's continue detection */