From: Aki Tuomi Date: Sat, 1 Nov 2014 14:09:34 +0000 (+0200) Subject: Throw is getSOA gets non-SOA record X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~98^2~17^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1861%2Fhead;p=thirdparty%2Fpdns.git Throw is getSOA gets non-SOA record --- diff --git a/pdns/dnsbackend.cc b/pdns/dnsbackend.cc index 5a935dfcc0..6f5ab3d0e2 100644 --- a/pdns/dnsbackend.cc +++ b/pdns/dnsbackend.cc @@ -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;