From 041e4f5e03e7c3a7feedee8fb62dc92957bff155 Mon Sep 17 00:00:00 2001 From: Leonardo Parente Date: Thu, 9 Feb 2023 18:31:31 -0400 Subject: [PATCH] Fix typo on rcode SERVFAIL --- libs/visor_dns/dns.h | 4 +-- src/handlers/dns/v1/DnsStreamHandler.h | 4 +-- src/handlers/dns/v1/tests/window-schema.json | 28 ++++++++++---------- src/handlers/dns/v2/DnsStreamHandler.h | 4 +-- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/libs/visor_dns/dns.h b/libs/visor_dns/dns.h index e457c5fa6..fdfbebfb4 100644 --- a/libs/visor_dns/dns.h +++ b/libs/visor_dns/dns.h @@ -218,7 +218,7 @@ static std::unordered_map QTypeNumbers({ static std::unordered_map RCodeNames({ {0, "NOERROR"}, {1, "FORMERR"}, - {2, "SRVFAIL"}, + {2, "SERVFAIL"}, {3, "NXDOMAIN"}, {4, "NOTIMP"}, {5, "REFUSED"}, @@ -242,7 +242,7 @@ static std::unordered_map RCodeNames({ static std::unordered_map RCodeNumbers({ {"NOERROR", 0}, {"FORMERR", 1}, - {"SRVFAIL", 2}, + {"SERVFAIL", 2}, {"NXDOMAIN", 3}, {"NOTIMP", 4}, {"REFUSED", 5}, diff --git a/src/handlers/dns/v1/DnsStreamHandler.h b/src/handlers/dns/v1/DnsStreamHandler.h index 4c5fd799e..729633ca8 100644 --- a/src/handlers/dns/v1/DnsStreamHandler.h +++ b/src/handlers/dns/v1/DnsStreamHandler.h @@ -123,7 +123,7 @@ class DnsMetricsBucket final : public visor::AbstractMetricsBucket , IPv6(DNS_SCHEMA, {"wire_packets", "ipv6"}, "Total DNS wire packets received over IPv6 (ingress and egress)") , NX(DNS_SCHEMA, {"wire_packets", "nxdomain"}, "Total DNS wire packets flagged as reply with return code NXDOMAIN (ingress and egress)") , REFUSED(DNS_SCHEMA, {"wire_packets", "refused"}, "Total DNS wire packets flagged as reply with return code REFUSED (ingress and egress)") - , SRVFAIL(DNS_SCHEMA, {"wire_packets", "srvfail"}, "Total DNS wire packets flagged as reply with return code SRVFAIL (ingress and egress)") + , SRVFAIL(DNS_SCHEMA, {"wire_packets", "servfail"}, "Total DNS wire packets flagged as reply with return code SERVFAIL (ingress and egress)") , RNOERROR(DNS_SCHEMA, {"wire_packets", "noerror"}, "Total DNS wire packets flagged as reply with return code NOERROR (ingress and egress)") , NODATA(DNS_SCHEMA, {"wire_packets", "nodata"}, "Total DNS wire packets flagged as reply with return code NOERROR and no answer section data (ingress and egress)") , total(DNS_SCHEMA, {"wire_packets", "total"}, "Total DNS wire packets matching the configured filter(s)") @@ -150,7 +150,7 @@ class DnsMetricsBucket final : public visor::AbstractMetricsBucket , _dns_topNX(DNS_SCHEMA, "qname", {"top_nxdomain"}, "Top QNAMES with result code NXDOMAIN") , _dns_topREFUSED(DNS_SCHEMA, "qname", {"top_refused"}, "Top QNAMES with result code REFUSED") , _dns_topSizedQnameResp(DNS_SCHEMA, "qname", {"top_qname_by_resp_bytes"}, "Top QNAMES by response volume in bytes") - , _dns_topSRVFAIL(DNS_SCHEMA, "qname", {"top_srvfail"}, "Top QNAMES with result code SRVFAIL") + , _dns_topSRVFAIL(DNS_SCHEMA, "qname", {"top_servfail"}, "Top QNAMES with result code SERVFAIL") , _dns_topNODATA(DNS_SCHEMA, "qname", {"top_nodata"}, "Top QNAMES with result code NOERROR and no answer section") , _dns_topNOERROR(DNS_SCHEMA, "qname", {"top_noerror"}, "Top QNAMES with result code NOERROR") , _dns_topUDPPort(DNS_SCHEMA, "port", {"top_udp_ports"}, "Top UDP source port on the query side of a transaction") diff --git a/src/handlers/dns/v1/tests/window-schema.json b/src/handlers/dns/v1/tests/window-schema.json index 9cc0521e1..a734a04f6 100644 --- a/src/handlers/dns/v1/tests/window-schema.json +++ b/src/handlers/dns/v1/tests/window-schema.json @@ -107,7 +107,7 @@ ], "top_refused": [], "top_qname_by_resp_bytes": [], - "top_srvfail": [], + "top_servfail": [], "top_udp_ports": [ { "estimate": 302, @@ -161,7 +161,7 @@ "queries": 2930, "refused": 0, "replies": 2921, - "srvfail": 0, + "servfail": 0, "tcp": 2880, "total": 5851, "udp": 2971, @@ -307,7 +307,7 @@ ], "top_refused": [], "top_qname_by_resp_bytes": [], - "top_srvfail": [], + "top_servfail": [], "top_udp_ports": [ { "estimate": 302, @@ -361,7 +361,7 @@ "queries": 2930, "refused": 0, "replies": 2921, - "srvfail": 0, + "servfail": 0, "tcp": 2880, "total": 5851, "udp": 2971 @@ -411,7 +411,7 @@ "top_rcode", "top_refused", "top_qname_by_resp_bytes", - "top_srvfail", + "top_servfail", "top_udp_ports", "wire_packets", "xact" @@ -849,10 +849,10 @@ "$id": "#/properties/dns/properties/top_qname_by_resp_bytes/items" } }, - "top_srvfail": { - "$id": "#/properties/dns/properties/top_srvfail", + "top_servfail": { + "$id": "#/properties/dns/properties/top_servfail", "type": "array", - "title": "The top_srvfail schema", + "title": "The top_servfail schema", "description": "An explanation about the purpose of this instance.", "default": [], "examples": [ @@ -860,7 +860,7 @@ ], "additionalItems": true, "items": { - "$id": "#/properties/dns/properties/top_srvfail/items" + "$id": "#/properties/dns/properties/top_servfail/items" } }, "top_udp_ports": { @@ -945,7 +945,7 @@ "queries": 2930, "refused": 0, "replies": 2921, - "srvfail": 0, + "servfail": 0, "tcp": 2880, "total": 5851, "udp": 2971, @@ -963,7 +963,7 @@ "queries", "refused", "replies", - "srvfail", + "servfail", "tcp", "total", "udp", @@ -1071,10 +1071,10 @@ 2921 ] }, - "srvfail": { - "$id": "#/properties/dns/properties/wire_packets/properties/srvfail", + "servfail": { + "$id": "#/properties/dns/properties/wire_packets/properties/servfail", "type": "integer", - "title": "The srvfail schema", + "title": "The servfail schema", "description": "An explanation about the purpose of this instance.", "default": 0, "examples": [ diff --git a/src/handlers/dns/v2/DnsStreamHandler.h b/src/handlers/dns/v2/DnsStreamHandler.h index 9c3d8b85e..52110555f 100644 --- a/src/handlers/dns/v2/DnsStreamHandler.h +++ b/src/handlers/dns/v2/DnsStreamHandler.h @@ -109,7 +109,7 @@ struct DnsDirection { , NX(DNS_SCHEMA, {"nxdomain_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code NXDOMAIN") , ECS(DNS_SCHEMA, {"ecs_xacts"}, "Total DNS transactions (query/reply pairs) with the EDNS Client Subnet option set") , REFUSED(DNS_SCHEMA, {"refused_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code REFUSED") - , SRVFAIL(DNS_SCHEMA, {"srvfail_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code SRVFAIL") + , SRVFAIL(DNS_SCHEMA, {"servfail_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code SERVFAIL") , RNOERROR(DNS_SCHEMA, {"noerror_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code NOERROR") , NODATA(DNS_SCHEMA, {"nodata_xacts"}, "Total DNS transactions (query/reply pairs) flagged as reply with return code NOERROR but with an empty answers section") , authData(DNS_SCHEMA, {"authenticated_data_xacts"}, "Total DNS transactions (query/reply pairs) with the AD flag set in the response") @@ -258,7 +258,7 @@ struct DnsDirection { , topNX(DNS_SCHEMA, "qname", {"top_nxdomain_xacts"}, "Top QNAMES with result code NXDOMAIN") , topREFUSED(DNS_SCHEMA, "qname", {"top_refused_xacts"}, "Top QNAMES with result code REFUSED") , topSizedQnameResp(DNS_SCHEMA, "qname", {"top_response_bytes"}, "Top QNAMES by response volume in bytes") - , topSRVFAIL(DNS_SCHEMA, "qname", {"top_srvfail_xacts"}, "Top QNAMES with result code SRVFAIL") + , topSRVFAIL(DNS_SCHEMA, "qname", {"top_servfail_xacts"}, "Top QNAMES with result code SERVFAIL") , topNODATA(DNS_SCHEMA, "qname", {"top_nodata_xacts"}, "Top QNAMES with result code NOERROR and empty answer section") , topNOERROR(DNS_SCHEMA, "qname", {"top_noerror_xacts"}, "Top QNAMES with result code NOERROR") , topUDPPort(DNS_SCHEMA, "port", {"top_udp_ports_xacts"}, "Top UDP source port on the query side of a transaction")