]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Throw is getSOA gets non-SOA record 1861/head
authorAki Tuomi <cmouse@desteem.org>
Sat, 1 Nov 2014 14:09:34 +0000 (16:09 +0200)
committerAki Tuomi <cmouse@cmouse.fi>
Thu, 2 Apr 2015 10:36:46 +0000 (13:36 +0300)
pdns/dnsbackend.cc

index 5a935dfcc0382254bdc8a6f6caf7eb22bfbc69d2..6f5ab3d0e271417e19e7dd8909af7accd747bf72 100644 (file)
@@ -238,6 +238,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;