]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
fix up 'wingsuitnews.com' - they don't deserve to resolve though..
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 8 Feb 2011 16:26:03 +0000 (16:26 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 8 Feb 2011 16:26:03 +0000 (16:26 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1996 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/syncres.cc

index f1532066a2997f4c8b77ec199095327dddb04496..0b5809349f5ef9ea23c4676dabd04a8bcd56b604 100644 (file)
@@ -993,7 +993,7 @@ int SyncRes::doResolveAt(set<string, CIStringCompare> nameservers, string auth,
       // supplant
       for(tcache_t::iterator i=tcache.begin();i!=tcache.end();++i) {
         if(i->second.size() > 1) {  // need to group the ttl to be the minimum of the RRSET (RFC 2181, 5.2)
-          uint32_t lowestTTL=numeric_limits<uint32_t>::max();
+          uint32_t lowestTTL=std::numeric_limits<uint32_t>::max();
           for(tcache_t::value_type::second_type::iterator j=i->second.begin(); j != i->second.end(); ++j)
             lowestTTL=min(lowestTTL, j->ttl);
           
@@ -1083,10 +1083,6 @@ int SyncRes::doResolveAt(set<string, CIStringCompare> nameservers, string auth,
         LOG<<prefix<<qname<<": status=got results, this level of recursion done"<<endl;
         return 0;
       }
-      if(lwr.d_rcode==RCode::NXDomain) {
-        LOG<<prefix<<qname<<": status=NXDOMAIN, we are done "<<(negindic ? "(have negative SOA)" : "")<<endl;
-        return RCode::NXDomain;
-      }
       if(!newtarget.empty()) {
         if(pdns_iequals(newtarget,qname)) {
           LOG<<prefix<<qname<<": status=got a CNAME referral to self, returning SERVFAIL"<<endl;
@@ -1101,6 +1097,10 @@ int SyncRes::doResolveAt(set<string, CIStringCompare> nameservers, string auth,
         set<GetBestNSAnswer> beenthere2;
         return doResolve(newtarget, qtype, ret, depth + 1, beenthere2);
       }
+      if(lwr.d_rcode==RCode::NXDomain) {
+        LOG<<prefix<<qname<<": status=NXDOMAIN, we are done "<<(negindic ? "(have negative SOA)" : "")<<endl;
+        return RCode::NXDomain;
+      }
       if(nsset.empty() && !lwr.d_rcode) {
         LOG<<prefix<<qname<<": status=noerror, other types may exist, but we are done "<<(negindic ? "(have negative SOA)" : "")<<endl;
         return 0;