From: Remi Gacogne Date: Wed, 9 Jan 2019 17:44:16 +0000 (+0100) Subject: rec: Scrub SOA records in authority for AA=0 answers X-Git-Tag: rec-4.2.0-alpha1~4^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=215c16f955076d693ff5f22032f1b32196e07f17;p=thirdparty%2Fpdns.git rec: Scrub SOA records in authority for AA=0 answers --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 7f72b73344..a513bf3576 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -2078,6 +2078,12 @@ void SyncRes::sanitizeRecords(const std::string& prefix, LWResult& lwr, const DN continue; } + if (!(lwr.d_aabit || wasForwardRecurse)) { + LOG(prefix<<"Removing irrelevant record '"<d_name<<"|"<d_type)<<"|"<d_content->getZoneRepresentation()<<"' in the "<<(int)rec->d_place<<" section received from "<