]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
eve/ike: restore common option logging
authorEric Leblond <el@stamus-networks.com>
Mon, 22 Mar 2021 21:42:10 +0000 (22:42 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 29 Mar 2021 05:55:49 +0000 (07:55 +0200)
src/output-json-ike.c

index 8ed200ecfa0ca56992ea332927d451b1d29601be..d3d4ba523440d671d3d3f9b4b93da0aa4bc0a866 100644 (file)
@@ -56,6 +56,7 @@
 typedef struct LogIKEFileCtx_ {
     LogFileCtx *file_ctx;
     uint32_t flags;
+    OutputJsonCommonSettings cfg;
 } LogIKEFileCtx;
 
 typedef struct LogIKELogThread_ {
@@ -85,6 +86,7 @@ static int JsonIKELogger(ThreadVars *tv, void *thread_data, const Packet *p, Flo
     if (unlikely(jb == NULL)) {
         return TM_ECODE_FAILED;
     }
+    EveAddCommonOptions(&thread->ikelog_ctx->cfg, p, f, jb);
 
     LogIKEFileCtx *ike_ctx = thread->ikelog_ctx;
     if (!rs_ike_logger_log(state, tx, ike_ctx->flags, jb)) {
@@ -119,6 +121,7 @@ static OutputInitResult OutputIKELogInitSub(ConfNode *conf, OutputCtx *parent_ct
         return result;
     }
     ikelog_ctx->file_ctx = ajt->file_ctx;
+    ikelog_ctx->cfg = ajt->cfg;
 
     OutputCtx *output_ctx = SCCalloc(1, sizeof(*output_ctx));
     if (unlikely(output_ctx == NULL)) {