From c1dcc2696536e29d134601828a70d71a0aa6f5bc Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Tue, 31 Jul 2018 09:14:26 +0200 Subject: [PATCH] detect/parse: improve direction setting on sigs Only set both directions if no direction has been explicitly set before. --- src/detect-parse.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/detect-parse.c b/src/detect-parse.c index 7760826962..cbc57576b4 100644 --- a/src/detect-parse.c +++ b/src/detect-parse.c @@ -1835,8 +1835,10 @@ static Signature *SigInitHelper(DetectEngineCtx *de_ctx, const char *sigstr, } if (!(sig->init_data->init_flags & SIG_FLAG_INIT_FLOW)) { - sig->flags |= SIG_FLAG_TOSERVER; - sig->flags |= SIG_FLAG_TOCLIENT; + if ((sig->flags & (SIG_FLAG_TOSERVER|SIG_FLAG_TOCLIENT)) == 0) { + sig->flags |= SIG_FLAG_TOSERVER; + sig->flags |= SIG_FLAG_TOCLIENT; + } } SCLogDebug("sig %"PRIu32" SIG_FLAG_APPLAYER: %s, SIG_FLAG_PACKET: %s", -- 2.47.2