From: Remi Gacogne Date: Fri, 15 Sep 2017 08:52:37 +0000 (+0200) Subject: rec: Skip looking for cuts once we are Insecure or Bogus, just (N)TA X-Git-Tag: rec-4.1.0-rc1~18^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3d4e836eeab5762e5b69e6551eb2fe518464fd6a;p=thirdparty%2Fpdns.git rec: Skip looking for cuts once we are Insecure or Bogus, just (N)TA --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 455e329b09..b7c7682590 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1519,10 +1519,35 @@ void SyncRes::computeZoneCuts(const DNSName& begin, const DNSName& end, unsigned if (cutIt != d_cutStates.cend()) { if (cutIt->second != Indeterminate) { LOG(d_prefix<<": - Cut already known at "<second; continue; } } + /* no need to look for NS and DS if we are already insecure or bogus, + just look for (N)TA + */ + if (cutState == Insecure || cutState == Bogus) { + dsmap_t ds; + vState newState = getDSRecords(qname, ds, true, depth); + if (newState == Indeterminate) { + continue; + } + + LOG(d_prefix<<": New state for "<