From: Pieter Lexis Date: Fri, 19 Jan 2018 09:42:24 +0000 (+0100) Subject: dnsparser: don't make UnknownRecordContent on IXFR X-Git-Tag: dnsdist-1.3.0~111^2~19 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2a1b24d193ffff519d5022a7b6ca109cf1be406;p=pdns dnsparser: don't make UnknownRecordContent on IXFR IXFRs contain the SOA of the client client's zone-version in the AUTHORITY section. Parse it properly so the ixfrdistributor can use it. --- diff --git a/pdns/dnsparser.cc b/pdns/dnsparser.cc index ba44b61e8..dfee6c399 100644 --- a/pdns/dnsparser.cc +++ b/pdns/dnsparser.cc @@ -285,7 +285,9 @@ void MOADNSParser::init(bool query, const char *packet, unsigned int len) dr.d_name=name; dr.d_clen=ah.d_clen; - if (query && (dr.d_place == DNSResourceRecord::ANSWER || dr.d_place == DNSResourceRecord::AUTHORITY || (dr.d_type != QType::OPT && dr.d_type != QType::TSIG && dr.d_type != QType::SIG && dr.d_type != QType::TKEY) || ((dr.d_type == QType::TSIG || dr.d_type == QType::SIG || dr.d_type == QType::TKEY) && dr.d_class != QClass::ANY))) { + if (query && + !(d_qtype == QType::IXFR && dr.d_place == DNSResourceRecord::AUTHORITY && dr.d_type == QType::SOA) && // IXFR queries have a SOA in their AUTHORITY section + (dr.d_place == DNSResourceRecord::ANSWER || dr.d_place == DNSResourceRecord::AUTHORITY || (dr.d_type != QType::OPT && dr.d_type != QType::TSIG && dr.d_type != QType::SIG && dr.d_type != QType::TKEY) || ((dr.d_type == QType::TSIG || dr.d_type == QType::SIG || dr.d_type == QType::TKEY) && dr.d_class != QClass::ANY))) { // cerr<<"discarding RR, query is "<(dr, pr); }