From: Victor Julien Date: Wed, 19 Oct 2022 12:29:05 +0000 (+0000) Subject: eve/drop: log direction if we have a flow X-Git-Tag: suricata-7.0.0-beta1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2d79a5206bd7d86aef8c0a2dc713405b259dc7e3;p=thirdparty%2Fsuricata.git eve/drop: log direction if we have a flow --- 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;