Zone: fixed CacheResponse issue by allowing authority records to be cached when qtype is NS and answer count is 0.

This commit is contained in:
Shreyas Zare
2019-05-04 17:22:57 +05:30
parent 4f80ceaf75
commit 5f96a117bb

View File

@@ -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)
{