diff --git a/etc/schema.json b/etc/schema.json index 531a09afd8..24b302e880 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -961,6 +961,9 @@ }, "dns": { "type": "object", + "required": [ + "version" + ], "properties": { "aa": { "type": "boolean" @@ -996,6 +999,7 @@ "type": "string" }, "version": { + "description": "The version of this EVE DNS event", "type": "integer" }, "opcode": { diff --git a/src/output-json-alert.c b/src/output-json-alert.c index 072e54b616..bb3e370c4d 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -230,6 +230,7 @@ static void AlertJsonDns(const Flow *f, const uint64_t tx_id, JsonBuilder *js) dns_state, tx_id); if (txptr) { jb_open_object(js, "dns"); + jb_set_int(js, "version", 2); JsonBuilder *qjs = JsonDNSLogQuery(txptr); if (qjs != NULL) { jb_set_object(js, "query", qjs); diff --git a/src/output-json-dns.c b/src/output-json-dns.c index 020e27853a..773091ca89 100644 --- a/src/output-json-dns.c +++ b/src/output-json-dns.c @@ -323,6 +323,7 @@ static int JsonDnsLoggerToServer(ThreadVars *tv, void *thread_data, } jb_open_object(jb, "dns"); + jb_set_int(jb, "version", 2); if (!rs_dns_log_json_query(txptr, i, td->dnslog_ctx->flags, jb)) { jb_free(jb); break;