]> granicus.if.org Git - pdns/commitdiff
teach core of powerdns that data can be auth or nonauth intrinsically
authorBert Hubert <bert.hubert@netherlabs.nl>
Sun, 18 Apr 2010 12:24:37 +0000 (12:24 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Sun, 18 Apr 2010 12:24:37 +0000 (12:24 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1554 d19b8d6e-7fed-0310-83ef-9ca221ded41b

pdns/dns.hh
pdns/dnsbackend.cc
pdns/dnsbackend.hh

index 061b5b4f526745845f1be2650f89bfca5b0e8030..d37edc09eef02de1d83a0d0aa608edb0c0201c0c 100644 (file)
@@ -74,6 +74,7 @@ public:
   QType qtype; //!< qtype of this record, ie A, CNAME, MX etc
   uint16_t qclass; //!< class of this record
   string qname; //!< the name of this record, for example: www.powerdns.com
+  string wildcardname;
   string content; //!< what this record points to. Example: 10.1.2.3
   uint16_t priority; //!< For qtype's that support a priority or preference. Currently only MX
   uint32_t ttl; //!< Time To Live of this record
@@ -82,6 +83,8 @@ public:
   enum Place {QUESTION=0, ANSWER=1, AUTHORITY=2, ADDITIONAL=3}; //!< Type describing the positioning of a DNSResourceRecord within, say, a DNSPacket
   Place d_place; //!< This specifies where a record goes within the packet
 
+  bool auth;
+
   bool operator<(const DNSResourceRecord &b) const
   {
     if(qname < b.qname)
index 1e3c363bcdb6fc1d0a6761c387edd7aecbb1a307..5b54f1fe7df664e77852c3e513c00f06b563932c 100644 (file)
@@ -208,6 +208,7 @@ bool DNSBackend::getSOA(const string &domain, SOAData &sd, DNSPacket *p)
   this->lookup(QType(QType::SOA),domain,p);
 
   DNSResourceRecord rr;
+  rr.auth = true; 
 
   int hits=0;
 
index 5e04ff578703fd6fb04851ac421a3f0ca88ef3f2..53d712f103aca4d8e632c5d1dfa859fcd5e53b1b 100644 (file)
@@ -28,6 +28,7 @@ class DNSPacket;
 #include <sys/types.h>
 #include "ahuexception.hh"
 #include <set>
+#include <iostream>
 
 #ifndef WIN32
 # include <sys/socket.h>
@@ -72,6 +73,13 @@ public:
   //! lookup() initiates a lookup. A lookup without results should not throw!
   virtual void lookup(const QType &qtype, const string &qdomain, DNSPacket *pkt_p=0, int zoneId=-1)=0; 
   virtual bool get(DNSResourceRecord &)=0; //!< retrieves one DNSResource record, returns false if no more were available
+
+  virtual bool getBeforeAndAfterNames(uint32_t id, const std::string qname, std::string& before, std::string& after)
+  {
+    std::cerr<<"Default beforeAndAfter called!"<<std::endl;
+    return false;
+  }
+
   //! Initiates a list of the specified domain
   /** Once initiated, DNSResourceRecord objects can be retrieved using get(). Should return false
       if the backend does not consider itself responsible for the id passed.