Tony Finch found that we put the SOA record in the wrong section on NO ERROR, NO DATA.

This commit is contained in:
bert hubert
2018-04-16 16:36:51 +02:00
parent 3c973406ba
commit f74eebf901

View File

@ -168,7 +168,7 @@ bool processQuestion(const DNSNode& zones, DNSMessageReader& dm, const ComboAddr
else {
cout<<"Node exists, qtype doesn't, NOERROR situation, inserting SOA"<<endl;
const auto& rrset = bestzone->rrsets[DNSType::SOA];
response.putRR(DNSSection::Answer, zonename, DNSType::SOA, rrset.ttl, rrset.contents[0]);
response.putRR(DNSSection::Authority, zonename, DNSType::SOA, rrset.ttl, rrset.contents[0]);
}
addAdditional(bestzone, zonename, additional, response);
}