From 215c16f955076d693ff5f22032f1b32196e07f17 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Wed, 9 Jan 2019 18:44:16 +0100 Subject: [PATCH] rec: Scrub SOA records in authority for AA=0 answers --- pdns/syncres.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 7f72b7334..a513bf357 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 "<