From 6152d1abca7af90e01c69873fa38a272456f76b5 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Sun, 31 Jan 2016 13:40:07 +0100 Subject: [PATCH] eve: fix stream payload logging wrong direction In the EVE stream payload logging the IPS path logged the wrong dir. Both IDS and IPS can take the same path as the detection engine inspects in the same direction in both cases, so the alert is also generated in the same direction. Bug #1684 --- src/output-json-alert.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/src/output-json-alert.c b/src/output-json-alert.c index 5bfe562857..32ec6c8498 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -275,18 +275,10 @@ static int AlertJson(ThreadVars *tv, JsonAlertLogThread *aft, const Packet *p) MemBufferReset(payload); - if (!EngineModeIsIPS()) { - if (p->flowflags & FLOW_PKT_TOSERVER) { - flag = FLOW_PKT_TOCLIENT; - } else { - flag = FLOW_PKT_TOSERVER; - } + if (p->flowflags & FLOW_PKT_TOSERVER) { + flag = FLOW_PKT_TOCLIENT; } else { - if (p->flowflags & FLOW_PKT_TOSERVER) { - flag = FLOW_PKT_TOSERVER; - } else { - flag = FLOW_PKT_TOCLIENT; - } + flag = FLOW_PKT_TOSERVER; } StreamSegmentForEach((const Packet *)p, flag, -- 2.47.2