From: Jason Ish Date: Wed, 4 Mar 2020 21:48:54 +0000 (-0600) Subject: dhcp/eve: add common eve fields X-Git-Tag: suricata-6.0.0-beta1~383 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9a3415fc2ad0ad73b574f0c84c2325a1145c993;p=thirdparty%2Fsuricata.git dhcp/eve: add common eve fields Add the common eve fields like metadata and community id. --- diff --git a/src/output-json-dhcp.c b/src/output-json-dhcp.c index dd12531d9a..183d3d08f1 100644 --- a/src/output-json-dhcp.c +++ b/src/output-json-dhcp.c @@ -50,6 +50,7 @@ typedef struct LogDHCPFileCtx_ { LogFileCtx *file_ctx; uint32_t flags; void *rs_logger; + OutputJsonCommonSettings cfg; } LogDHCPFileCtx; typedef struct LogDHCPLogThread_ { @@ -73,6 +74,8 @@ static int JsonDHCPLogger(ThreadVars *tv, void *thread_data, return TM_ECODE_FAILED; } + EveAddCommonOptions(&thread->dhcplog_ctx->cfg, p, f, js); + rs_dhcp_logger_log(ctx->rs_logger, tx, js); if (!jb_close(js)) { goto fail; @@ -108,6 +111,7 @@ static OutputInitResult OutputDHCPLogInitSub(ConfNode *conf, return result; } dhcplog_ctx->file_ctx = ajt->file_ctx; + dhcplog_ctx->cfg = ajt->cfg; OutputCtx *output_ctx = SCCalloc(1, sizeof(*output_ctx)); if (unlikely(output_ctx == NULL)) {