Skip to content

Commit 48ed06d

Browse files
committed
eve: log version starting with version 2
Log the version of EVE used in the event.
1 parent a730a24 commit 48ed06d

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

etc/schema.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8813,6 +8813,10 @@
88138813
"tx_id": {
88148814
"type": "integer"
88158815
},
8816+
"v": {
8817+
"type": "integer",
8818+
"description": "Version of EVE in the event"
8819+
},
88168820
"verdict": {
88178821
"$ref": "#/$defs/verdict_type"
88188822
},

src/output-json.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,9 @@ void EveAddCommonOptions(const OutputJsonCommonSettings *cfg, const Packet *p, c
410410
if (cfg->include_community_id && f != NULL) {
411411
CreateEveCommunityFlowId(js, f, cfg->community_id_seed);
412412
}
413+
if (cfg->eve_version >= EVE_MIN_LOG_VERSION) {
414+
SCJbSetUint(js, "v", cfg->eve_version);
415+
}
413416
if (f != NULL && f->tenant_id > 0) {
414417
SCJbSetUint(js, "tenant_id", f->tenant_id);
415418
}

src/output-json.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ void OutputJsonRegister(void);
3838
#define JSON_PROTO_LEN 16
3939

4040
#define EVE_MAX_VERSION 2
41+
#define EVE_MIN_LOG_VERSION 2
4142
#define EVE_VERSION_GLOBAL_APP_PROTO 2
4243

4344
/* A struct to contain address info for rendering to JSON. */

0 commit comments

Comments
 (0)