From: Pieter Lexis Date: Mon, 13 Jul 2015 13:51:23 +0000 (+0200) Subject: syncres.cc: replace '=="."' with '.isRoot()' X-Git-Tag: dnsdist-1.0.0-alpha1~248^2~57^2~3^2~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=52683ca3c6fe38ba6243b25e418dfce446dd6100;p=thirdparty%2Fpdns.git syncres.cc: replace '=="."' with '.isRoot()' --- diff --git a/pdns/syncres.cc b/pdns/syncres.cc index eda5eaeaae..b0994a3120 100644 --- a/pdns/syncres.cc +++ b/pdns/syncres.cc @@ -394,7 +394,7 @@ int SyncRes::doResolve(const DNSName &qname, const QType &qtype, vectornegcache.find(tie(getLastLabel(qname), qtnull))) != t_sstorage->negcache.end() && - range.first->d_qname=="." && (uint32_t)d_now.tv_sec < range.first->d_ttd ) { + range.first->d_qname.isRoot() && (uint32_t)d_now.tv_sec < range.first->d_ttd ) { sttl=range.first->d_ttd - d_now.tv_sec; LOG(prefix<d_name.toString()<<"' & '"<d_qname.toString()<<"' for another "< nameservers, DNSName auth, bool flawedNSSe ne.d_qtype=QType(0); // this encodes 'whole record' replacing_insert(t_sstorage->negcache, ne); - if(s_rootNXTrust && auth==".") { + if(s_rootNXTrust && auth.isRoot()) { ne.d_name = getLastLabel(ne.d_name); replacing_insert(t_sstorage->negcache, ne); }