]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
auth: canDoAXFR: avoid confusing B name 9470/head
authorChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Mon, 14 Sep 2020 20:53:26 +0000 (22:53 +0200)
committerChris Hofstaedtler <chris.hofstaedtler@deduktiva.com>
Thu, 24 Sep 2020 12:06:51 +0000 (14:06 +0200)
pdns/tcpreceiver.cc

index 6a56ce13b4546016522ee1128a68b483d235745c..b35bbd9669502011dab11e1e603d425ef2877001 100644 (file)
@@ -426,7 +426,6 @@ bool TCPNameserver::canDoAXFR(std::unique_ptr<DNSPacket>& q)
   SOAData sd;
   if(s_P->getBackend()->getSOAUncached(q->qdomain,sd)) {
     // cerr<<"got backend and SOA"<<endl;
-    DNSBackend *B=sd.db;
     vector<string> acl;
     s_P->getBackend()->getDomainMetadata(q->qdomain, "ALLOW-AXFR-FROM", acl);
     for (vector<string>::const_iterator i = acl.begin(); i != acl.end(); ++i) {
@@ -437,9 +436,10 @@ bool TCPNameserver::canDoAXFR(std::unique_ptr<DNSPacket>& q)
         DNSResourceRecord rr;
         set<DNSName> nsset;
 
-        B->lookup(QType(QType::NS),q->qdomain,sd.domain_id);
-        while(B->get(rr)) 
+        sd.db->lookup(QType(QType::NS), q->qdomain, sd.domain_id);
+        while (sd.db->get(rr)) {
           nsset.insert(DNSName(rr.content));
+        }
         for(const auto & j: nsset) {
           vector<string> nsips=fns.lookup(j, s_P->getBackend());
           for(vector<string>::const_iterator k=nsips.begin();k!=nsips.end();++k) {