From: bert hubert Date: Thu, 5 Nov 2015 19:59:58 +0000 (+0100) Subject: removal of dottedEndsOn X-Git-Tag: dnsdist-1.0.0-alpha1~239^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c32f9f94ef50fe458b20925541062c6bd6d8563f;p=pdns removal of dottedEndsOn --- 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()<<"'"<