From c32f9f94ef50fe458b20925541062c6bd6d8563f Mon Sep 17 00:00:00 2001 From: bert hubert Date: Thu, 5 Nov 2015 20:59:58 +0100 Subject: [PATCH] removal of dottedEndsOn --- pdns/misc.cc | 8 -------- pdns/misc.hh | 1 - pdns/syncres.cc | 8 ++++---- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/pdns/misc.cc b/pdns/misc.cc index 0b2f7c8ad..f33584f98 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -223,14 +223,6 @@ bool endsOn(const string &domain, const string &suffix) return true; } -// REMOVE ME -bool dottedEndsOn(const DNSName &domain, const DNSName &suffix) -{ - return domain.isPartOf(suffix); -} - - - static void parseService4(const string &descr, ServiceTuple &st) { vectorparts; diff --git a/pdns/misc.hh b/pdns/misc.hh index 3697af4f6..9dbad019b 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -55,7 +55,6 @@ bool chopOff(string &domain); bool chopOffDotted(string &domain); bool endsOn(const string &domain, const string &suffix); -bool dottedEndsOn(const DNSName &domain, const DNSName &suffix); // REMOVE ME string nowTime(); const string unquotify(const string &item); string humanDuration(time_t passed); diff --git a/pdns/syncres.cc b/pdns/syncres.cc index 64c515ede..719fe1a30 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -1180,8 +1180,8 @@ int SyncRes::doResolveAt(set nameservers, DNSName auth, bool flawedNSSe for(auto& rec : lwr.d_records) { if(rec.d_place==DNSResourceRecord::AUTHORITY && rec.d_type==QType::SOA && - lwr.d_rcode==RCode::NXDomain && dottedEndsOn(qname,rec.d_name) && dottedEndsOn(rec.d_name, auth)) { - LOG(prefix< nameservers, DNSName auth, bool flawedNSSe } nsset.insert(DNSName(rec.d_content->getZoneRepresentation())); } - else if(rec.d_place==DNSResourceRecord::AUTHORITY && dottedEndsOn(qname,rec.d_name) && rec.d_type==QType::DS) { + else if(rec.d_place==DNSResourceRecord::AUTHORITY && qname.isPartOf(rec.d_name) && rec.d_type==QType::DS) { LOG(prefix< '"<getZoneRepresentation()<<"'"<