From 8dbc774dfa3dade9cc950d31594e4cf23bdb5945 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Fri, 13 Nov 2020 13:15:14 -0600 Subject: [PATCH] dns: eve 1 deprecation warning Redmine issue: https://redmine.openinfosecfoundation.org/issues/4137 --- src/output-json-dns.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/output-json-dns.c b/src/output-json-dns.c index 1e922d9b63..3ce11613e0 100644 --- a/src/output-json-dns.c +++ b/src/output-json-dns.c @@ -270,6 +270,8 @@ typedef struct LogDnsLogThread_ { MemBuffer *buffer; } LogDnsLogThread; +static bool v1_deprecation_warned = false; + JsonBuilder *JsonDNSLogQuery(void *txptr, uint64_t tx_id) { JsonBuilder *queryjb = jb_new_array(); @@ -566,6 +568,12 @@ static DnsVersion JsonDnsParseVersion(ConfNode *conf) version); } + if (!v1_deprecation_warned && version == DNS_VERSION_1) { + SCLogWarning(SC_WARN_DEPRECATED, "DNS EVE v1 style logs have been " + "deprecated and will be removed by May 2022"); + v1_deprecation_warned = true; + } + return version; } -- 2.47.2