]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
dns: eve 1 deprecation warning
authorJason Ish <jason.ish@oisf.net>
Fri, 13 Nov 2020 19:15:14 +0000 (13:15 -0600)
committerVictor Julien <victor@inliniac.net>
Sun, 15 Nov 2020 07:03:21 +0000 (08:03 +0100)
Redmine issue:
https://redmine.openinfosecfoundation.org/issues/4137

src/output-json-dns.c

index 1e922d9b638c8588c28c42d8d87822f6713afe53..3ce11613e05bf8ba4ee8ffb37b5cc3fdf8edcd7d 100644 (file)
@@ -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;
 }