From: Aki Tuomi Date: Sat, 1 Nov 2014 14:09:34 +0000 (+0200) Subject: Throw if getSOA gets non-SOA record X-Git-Tag: auth-3.4.4~4^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2418%2Fhead;p=thirdparty%2Fpdns.git Throw if getSOA gets non-SOA record --- diff --git a/pdns/dnsbackend.cc b/pdns/dnsbackend.cc index e022edcdff..9615aaa08a 100644 --- a/pdns/dnsbackend.cc +++ b/pdns/dnsbackend.cc @@ -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;