Permalink
Browse files

Throw if getSOA gets non-SOA record

  • Loading branch information...
1 parent 54784f4 commit 267fddee8358f1707026a5ccb430f7af54b54a8d @cmouse cmouse committed Nov 1, 2014
Showing with 1 addition and 0 deletions.
  1. +1 −0 pdns/dnsbackend.cc
View
@@ -251,6 +251,7 @@ bool DNSBackend::getSOA(const string &domain, SOAData &sd, DNSPacket *p)
int hits=0;
while(this->get(rr)) {
+ if (rr.qtype != QType::SOA) throw PDNSException("Got non-SOA record when asking for SOA");
hits++;
fillSOAData(rr.content, sd);
sd.domain_id=rr.domain_id;

0 comments on commit 267fdde

Please sign in to comment.