From: Jeff Lucovsky Date: Mon, 29 Jun 2020 13:51:35 +0000 (-0400) Subject: output/rdp: Include common output options X-Git-Tag: suricata-6.0.0-beta1~297 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d298d47a1d280922ccf6363166fb7b0fe83fa7d;p=thirdparty%2Fsuricata.git output/rdp: Include common output options This commit will cause common metadata values and the community id to be included in log output when configured. --- diff --git a/src/output-json-rdp.c b/src/output-json-rdp.c index d28336ce11..d9d5c33e1b 100644 --- a/src/output-json-rdp.c +++ b/src/output-json-rdp.c @@ -46,6 +46,7 @@ typedef struct LogRdpFileCtx_ { LogFileCtx *file_ctx; uint32_t flags; + OutputJsonCommonSettings cfg; } LogRdpFileCtx; typedef struct LogRdpLogThread_ { @@ -70,6 +71,7 @@ static int JsonRdpLogger(ThreadVars *tv, void *thread_data, } json_object_set_new(js, "rdp", rdp_js); + JsonAddCommonOptions(&thread->rdplog_ctx->cfg, p, f, js); MemBufferReset(thread->buffer); OutputJSONBuffer(js, thread->rdplog_ctx->file_ctx, &thread->buffer); json_decref(js); @@ -99,6 +101,7 @@ static OutputInitResult OutputRdpLogInitSub(ConfNode *conf, return result; } rdplog_ctx->file_ctx = ajt->file_ctx; + rdplog_ctx->cfg = ajt->cfg; OutputCtx *output_ctx = SCCalloc(1, sizeof(*output_ctx)); if (unlikely(output_ctx == NULL)) {