From 5f96a117bb1855a2e564b9dbe01151fef0a1714a Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sat, 4 May 2019 17:22:57 +0530 Subject: [PATCH] Zone: fixed CacheResponse issue by allowing authority records to be cached when qtype is NS and answer count is 0. --- DnsServerCore/Zone.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DnsServerCore/Zone.cs b/DnsServerCore/Zone.cs index 81322071..4ac35743 100644 --- a/DnsServerCore/Zone.cs +++ b/DnsServerCore/Zone.cs @@ -1046,7 +1046,7 @@ namespace DnsServerCore return; //nothing to do } - if ((response.Question.Length > 0) && (response.Question[0].Type != DnsResourceRecordType.NS)) + if ((response.Question.Length > 0) && ((response.Question[0].Type != DnsResourceRecordType.NS) || (response.Answer.Length == 0))) { foreach (DnsQuestionRecord question in response.Question) {