From 1b7bad88bb7609ccfc5e2f7e6d10098325266f50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Preu=C3=9F?= Date: Sun, 27 Dec 2020 03:30:52 +0100 Subject: [PATCH 1/2] Added missing NS query type to getQueryTypes() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Preuß --- src/api/api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/api/api.c b/src/api/api.c index 09bd1ff62..81f1f3379 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -620,11 +620,11 @@ void getQueryTypes(const int *sock) ssend(*sock, "A (IPv4): %.2f\nAAAA (IPv6): %.2f\nANY: %.2f\nSRV: %.2f\n" "SOA: %.2f\nPTR: %.2f\nTXT: %.2f\nNAPTR: %.2f\n" "MX: %.2f\nDS: %.2f\nRRSIG: %.2f\nDNSKEY: %.2f\n" - "OTHER: %.2f\n", + "NS: %.2f\n" "OTHER: %.2f\n", percentage[TYPE_A], percentage[TYPE_AAAA], percentage[TYPE_ANY], percentage[TYPE_SRV], percentage[TYPE_SOA], percentage[TYPE_PTR], percentage[TYPE_TXT], percentage[TYPE_NAPTR], percentage[TYPE_MX], percentage[TYPE_DS], percentage[TYPE_RRSIG], percentage[TYPE_DNSKEY], - percentage[TYPE_OTHER]); + percentage[TYPE_NS], percentage[TYPE_OTHER]); } else { pack_str32(*sock, "A (IPv4)"); @@ -651,6 +651,8 @@ void getQueryTypes(const int *sock) pack_float(*sock, percentage[TYPE_RRSIG]); pack_str32(*sock, "DNSKEY"); pack_float(*sock, percentage[TYPE_DNSKEY]); + pack_str32(*sock, "NS"); + pack_float(*sock, percentage[TYPE_NS]); pack_str32(*sock, "OTHER"); pack_float(*sock, percentage[TYPE_OTHER]); } From d1e849e65035df78af7ab80d815b6ac87ce5faa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Preu=C3=9F?= Date: Sun, 27 Dec 2020 21:13:44 +0100 Subject: [PATCH 2/2] Modified test for NS type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Fabian Preuß --- test/test_suite.bats | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/test_suite.bats b/test/test_suite.bats index 84ec90519..a166912b8 100644 --- a/test/test_suite.bats +++ b/test/test_suite.bats @@ -356,8 +356,9 @@ [[ ${lines[10]} == "DS: 0.00" ]] [[ ${lines[11]} == "RRSIG: 0.00" ]] [[ ${lines[12]} == "DNSKEY: 0.00" ]] - [[ ${lines[13]} == "OTHER: 0.00" ]] - [[ ${lines[14]} == "" ]] + [[ ${lines[13]} == "NS: 0.00" ]] + [[ ${lines[14]} == "OTHER: 0.00" ]] + [[ ${lines[15]} == "" ]] } # Here and below: Acknowledge that there might be a host name after