From 2d79a5206bd7d86aef8c0a2dc713405b259dc7e3 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 19 Oct 2022 12:29:05 +0000 Subject: [PATCH] eve/drop: log direction if we have a flow --- src/output-json-drop.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/output-json-drop.c b/src/output-json-drop.c index 19a692e73b..1177c32607 100644 --- a/src/output-json-drop.c +++ b/src/output-json-drop.c @@ -93,6 +93,14 @@ static int DropLogJSON (JsonDropLogThread *aft, const Packet *p) if (unlikely(js == NULL)) return TM_ECODE_OK; + if (p->flow != NULL) { + if (p->flowflags & FLOW_PKT_TOSERVER) { + jb_set_string(js, "direction", "to_server"); + } else { + jb_set_string(js, "direction", "to_client"); + } + } + jb_open_object(js, "drop"); uint16_t proto = 0;