]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
remove lmdb leftovers
authorKees Monshouwer <mind04@monshouwer.org>
Thu, 19 Nov 2015 14:05:34 +0000 (15:05 +0100)
committermind04 <mind04@monshouwer.org>
Thu, 19 Nov 2015 14:05:34 +0000 (15:05 +0100)
pdns/dbdnsseckeeper.cc
pdns/dnsbackend.hh
pdns/packethandler.cc
pdns/ueberbackend.cc
pdns/ueberbackend.hh

index 76b73c58c32c9e42557a41e2c05f8efa661d1f9c..1c97c1b5ecb4505460f2dadaf95f69f61da4c4ba 100644 (file)
@@ -441,16 +441,6 @@ bool DNSSECKeeper::getPreRRSIGs(UeberBackend& db, const DNSName& signer, const D
         const DNSName& wildcardname, const QType& qtype,
         DNSResourceRecord::Place signPlace, vector<DNSResourceRecord>& rrsigs, uint32_t signTTL)
 {
-  vector<DNSResourceRecord> sigs;
-  if(db.getDirectRRSIGs(signer, wildcardname.countLabels() ? wildcardname : qname, qtype, sigs)) {
-    BOOST_FOREACH(DNSResourceRecord &rr, sigs) {
-      rr.d_place = signPlace;
-      rr.ttl = signTTL;
-      rrsigs.push_back(rr);
-    }
-    return true;
-  }
-
   // cerr<<"Doing DB lookup for precomputed RRSIGs for '"<<(wildcardname.empty() ? qname : wildcardname)<<"'"<<endl;
         SOAData sd;
         if(!db.getSOAUncached(signer, sd)) {
index 5bc2fc11dd80111a92b1eb5ffd7d7981ea9fd399..f940661fd955d2142b179ac48d8945eefa112d62 100644 (file)
@@ -355,17 +355,6 @@ public:
     return false;
   }
 
-  //! called to get a NSECx record from backend
-  virtual bool getDirectNSECx(uint32_t id, const string &hashed, const QType &qtype, DNSName &before, DNSResourceRecord &rr)
-  {
-    return false;
-  }
-  //! called to get RRSIG record(s) from backend
-  virtual bool getDirectRRSIGs(const DNSName &signer, const DNSName &qname, const QType &qtype, vector<DNSResourceRecord> &rrsigs)
-  {
-    return false;
-  }
-
   virtual string directBackendCmd(const string &query)
   {
     return "directBackendCmd not supported for this backend\n";
index 02562b2108ebf8fefc80929607f6c4a15e27cc6b..de2d85341cd0a1263987b1d85f74dd603e166851 100644 (file)
@@ -653,8 +653,7 @@ void PacketHandler::addNSEC3(DNSPacket *p, DNSPacket *r, const DNSName& target,
     hashed=hashQNameWithSalt(ns3rc, unhashed);
     DLOG(L<<"1 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
 
-    // if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr))
-      getNSEC3Hashes(narrow, sd.db, sd.domain_id,  hashed, false, unhashed, before, after, mode);
+    getNSEC3Hashes(narrow, sd.db, sd.domain_id,  hashed, false, unhashed, before, after, mode);
 
     if (((mode == 0 && ns3rc.d_flags) ||  mode == 1) && (hashed != before)) {
       DLOG(L<<"No matching NSEC3, do closest (provable) encloser"<<endl);
@@ -674,8 +673,7 @@ void PacketHandler::addNSEC3(DNSPacket *p, DNSPacket *r, const DNSName& target,
       hashed=hashQNameWithSalt(ns3rc, unhashed);
       DLOG(L<<"1 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
 
-      // if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr))
-        getNSEC3Hashes(narrow, sd.db, sd.domain_id,  hashed, false, unhashed, before, after);
+      getNSEC3Hashes(narrow, sd.db, sd.domain_id,  hashed, false, unhashed, before, after);
     }
 
     if (!after.empty()) {
@@ -695,12 +693,10 @@ void PacketHandler::addNSEC3(DNSPacket *p, DNSPacket *r, const DNSName& target,
 
     hashed=hashQNameWithSalt(ns3rc, unhashed);
     DLOG(L<<"2 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
-    // if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr)) {
-      getNSEC3Hashes(narrow, sd.db,sd.domain_id,  hashed, true, unhashed, before, after);
-      DLOG(L<<"Done calling for covering, hashed: '"<<toBase32Hex(hashed)<<"' before='"<<toBase32Hex(before)<<"', after='"<<toBase32Hex(after)<<"'"<<endl);
-      emitNSEC3( r, sd, ns3rc, unhashed, before, after, mode);
-    // } else if(!before.empty())
-    //   r->addRecord(rr);
+
+    getNSEC3Hashes(narrow, sd.db,sd.domain_id,  hashed, true, unhashed, before, after);
+    DLOG(L<<"Done calling for covering, hashed: '"<<toBase32Hex(hashed)<<"' before='"<<toBase32Hex(before)<<"', after='"<<toBase32Hex(after)<<"'"<<endl);
+    emitNSEC3( r, sd, ns3rc, unhashed, before, after, mode);
   }
 
   // wildcard denial
@@ -710,12 +706,9 @@ void PacketHandler::addNSEC3(DNSPacket *p, DNSPacket *r, const DNSName& target,
     hashed=hashQNameWithSalt(ns3rc, unhashed);
     DLOG(L<<"3 hash: "<<toBase32Hex(hashed)<<" "<<unhashed<<endl);
 
-    // if(!B.getDirectNSECx(sd.domain_id, hashed, QType(QType::NSEC3), before, rr)) {
-      getNSEC3Hashes(narrow, sd.db, sd.domain_id,  hashed, (mode != 2), unhashed, before, after);
-      DLOG(L<<"Done calling for '*', hashed: '"<<toBase32Hex(hashed)<<"' before='"<<toBase32Hex(before)<<"', after='"<<toBase32Hex(after)<<"'"<<endl);
-      emitNSEC3( r, sd, ns3rc, unhashed, before, after, mode);
-    // } else if(!before.empty())
-    //   r->addRecord(rr);
+    getNSEC3Hashes(narrow, sd.db, sd.domain_id,  hashed, (mode != 2), unhashed, before, after);
+    DLOG(L<<"Done calling for '*', hashed: '"<<toBase32Hex(hashed)<<"' before='"<<toBase32Hex(before)<<"', after='"<<toBase32Hex(after)<<"'"<<endl);
+    emitNSEC3( r, sd, ns3rc, unhashed, before, after, mode);
   }
 }
 
@@ -730,17 +723,8 @@ void PacketHandler::addNSEC(DNSPacket *p, DNSPacket *r, const DNSName& target, c
   }
 
   DNSName before,after;
-  DNSResourceRecord rr;
-
-  rr.auth=false;
-  // if(!B.getDirectNSECx(sd.domain_id, toLower(labelReverse(makeRelative(target.toString(), auth.toString()))) /* FIXME DNSName should do this */, QType(QType::NSEC), before, rr)) {
-    sd.db->getBeforeAndAfterNames(sd.domain_id, auth, target, before, after);
-    emitNSEC(r, sd, before, after, mode);
-  // } else if(rr.auth) {
-  //   if (mode == 5)
-  //     rr.d_place=DNSResourceRecord::ANSWER;
-  //   r->addRecord(rr);
-  // }
+  sd.db->getBeforeAndAfterNames(sd.domain_id, auth, target, before, after);
+  emitNSEC(r, sd, before, after, mode);
 
   if (mode == 2 || mode == 4) {
     // wildcard NO-DATA or wildcard denial
@@ -750,12 +734,8 @@ void PacketHandler::addNSEC(DNSPacket *p, DNSPacket *r, const DNSName& target, c
       closest.chopOff();
       closest.prependRawLabel("*");
     }
-    rr.auth=false;
-    if(!B.getDirectNSECx(sd.domain_id, toLower(labelReverse(makeRelative(closest.toString(), auth.toString()))), QType(QType::NSEC), before, rr)) {
-      sd.db->getBeforeAndAfterNames(sd.domain_id, auth, closest, before, after);
-      emitNSEC(r, sd, before, after, mode);
-    } else if(rr.auth)
-      r->addRecord(rr);
+    sd.db->getBeforeAndAfterNames(sd.domain_id, auth, closest, before, after);
+    emitNSEC(r, sd, before, after, mode);
   }
   return;
 }
index 98e78be40e76f1e69ef16f462138715375d65740..37290c360ea6ad4dde7ddd54cc442a82690f1e3f 100644 (file)
@@ -210,24 +210,6 @@ bool UeberBackend::getTSIGKeys(std::vector< struct TSIGKey > &keys)
   return true;
 }
 
-bool UeberBackend::getDirectNSECx(uint32_t id, const string &hashed, const QType &qtype, DNSName &before, DNSResourceRecord &rr)
-{
-  BOOST_FOREACH(DNSBackend* db, backends) {
-    if(db->getDirectNSECx(id, hashed, qtype, before, rr))
-      return true;
-  }
-  return false;
-}
-
-bool UeberBackend::getDirectRRSIGs(const DNSName &signer, const DNSName &qname, const QType &qtype, vector<DNSResourceRecord> &rrsigs)
-{
-  BOOST_FOREACH(DNSBackend* db, backends) {
-    if(db->getDirectRRSIGs(signer, qname, qtype, rrsigs))
-      return true;
-  }
-  return false;
-}
-
 void UeberBackend::reload()
 {
   for ( vector< DNSBackend * >::iterator i = backends.begin(); i != backends.end(); ++i )
index c87b132c970d371e3e16eceda9a944711d61f3d3..44a14fd50d568110f98f7210c9d146a60080900d 100644 (file)
@@ -126,9 +126,6 @@ public:
   bool activateDomainKey(const DNSName& name, unsigned int id);
   bool deactivateDomainKey(const DNSName& name, unsigned int id);
 
-  bool getDirectNSECx(uint32_t id, const string &hashed, const QType &qtype, DNSName &before, DNSResourceRecord &rr);
-  bool getDirectRRSIGs(const DNSName &signer, const DNSName &qname, const QType &qtype, vector<DNSResourceRecord> &rrsigs);
-
   bool getTSIGKey(const DNSName& name, DNSName* algorithm, string* content);
   bool setTSIGKey(const DNSName& name, const DNSName& algorithm, const string& content);
   bool deleteTSIGKey(const DNSName& name);