]> granicus.if.org Git - pdns/commitdiff
working up to 2.9.7
authorBert Hubert <bert.hubert@netherlabs.nl>
Tue, 4 Mar 2003 18:33:39 +0000 (18:33 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Tue, 4 Mar 2003 18:33:39 +0000 (18:33 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@156 d19b8d6e-7fed-0310-83ef-9ca221ded41b

13 files changed:
ChangeLog
modules/ldapbackend/ldapbackend.cc
modules/ldapbackend/ldapbackend.hh
pdns/Makefile.am
pdns/backends/bind/Makefile.am
pdns/backends/bind/zoneparser.hh
pdns/backends/bind/zoneparser2.cc
pdns/common_startup.cc
pdns/docs/pdns.sgml
pdns/dynmessenger.cc
pdns/pdns_recursor.cc
pdns/receiver.cc
pdns/tcpreceiver.cc

index 5c3ce7405fe395739d2d5dae03142080d153069e..d6779142dafaa64ce7595f26f9e07613255d5941 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,10 @@ Changes since 2.9.6:
        - zone2sql no longer silently tries to read directories
        - improved error reporting if unable to figure out IP addresses for
          slaves
+       - removed vestigal receiver-threads setting
+       - ldapbackend needs to include utility.hh (Remco Post)
+       - pdns_control could sometimes leave files behind in /tmp (dG)
+       - ldapbackend updates   
 
 Changes since 2.9.5:
        - implemented isMaster in bindbackend (we now react to notifies)
index ce166f0189da248dd60b90bab42a5e49464b5e91..3f05326b34ac984ac789c737a0a54d072b29b652 100644 (file)
@@ -1,12 +1,20 @@
 #include "ldapbackend.hh"
+
 #include <algorithm>
 #include <utility>
 #include <ctype.h> 
 
+static int Toupper(int c)
+{
+  return toupper(c);
+}
+
+
 LdapBackend::LdapBackend( const string &suffix )
 {
        m_msgid = 0;
        m_qname = "";
+       m_revlookup = 0;
        setArgPrefix( "ldap" + suffix );
 
        L << Logger::Notice << backendname << " Server = " << getArg( "host" ) << ":" << getArg( "port" ) << endl;
@@ -35,20 +43,35 @@ bool LdapBackend::list( int domain_id )
 
 void LdapBackend::lookup( const QType &qtype, const string &qname, DNSPacket *dnspkt, int zoneid )
 {
-       string filter, attr;
+       int len = 0;
+       vector<string> parts;
+       string filter, attr, ipaddr;
        char** attributes = attrany;
-       char* attronly[] = { NULL, NULL };
+       char* attronly[] = { "associatedDomain", NULL, NULL };
 
 
        m_qtype = qtype;
-       m_qname = m_pldap->escape( qname );
-       filter = "(associatedDomain=" + m_qname + ")";
+       m_qname = qname;
+       len = qname.length();
 
-       if( qtype.getCode() != 255 )   // qtype != ANY
+       if( len > 20 && qname.substr( len - 13, 13 ) == ".in-addr.arpa" )
+       {
+               m_revlookup = 1;
+               stringtok( parts, qname.substr( 0, len - 13 ), "." );
+               filter = "(aRecord=" + parts[3] + "." + parts[2] + "." + parts[1] + "." + parts[0] + ")";
+               attributes = attronly;
+       }
+       else
+       {
+               m_revlookup = 0;
+               filter = "(associatedDomain=" + m_pldap->escape( m_qname ) + ")";
+       }
+
+       if( qtype.getCode() != QType::ANY )
        {
                attr = qtype.getName() + "Record";
                filter = "(&" + filter + "(" + attr + "=*))";
-               attronly[0] = (char*) attr.c_str();
+               attronly[1] = (char*) attr.c_str();
                attributes = attronly;
        }
 
@@ -57,10 +80,6 @@ void LdapBackend::lookup( const QType &qtype, const string &qname, DNSPacket *dn
        L << Logger::Info << backendname << " Search = basedn: " << getArg( "basedn" ) << ", filter: " << filter << ", qtype: " << qtype.getName() << endl;
 }
 
-static int Toupper(int c)
-{
-  return toupper(c);
-}
 
 bool LdapBackend::get( DNSResourceRecord &rr )
 {
@@ -75,13 +94,19 @@ bool LdapBackend::get( DNSResourceRecord &rr )
        {
                while( !m_result.empty() )
                {
+                       if( m_revlookup == 1 && m_result.find( "associatedDomain" ) != m_result.end() )
+                       {
+                               m_result["PTRRecord"] = m_result["associatedDomain"];
+                       }
+                       m_result.erase( "associatedDomain" );
+
                        attribute = m_result.begin();
                        attrname = attribute->first;
                        qstr = attrname.substr( 0, attrname.length() - 6 );   // extract qtype string from ldap attribute name
                        transform( qstr.begin(), qstr.end(), qstr.begin(), &Toupper );
                        qt = QType( const_cast<char*>(qstr.c_str()) );
 
-                       while( !attribute->second.empty() && ( m_qtype == "ANY" || qt.getCode() == m_qtype.getCode() ) )
+                       while( !attribute->second.empty() && ( m_qtype.getCode() == QType::ANY ||  m_qtype.getCode() == qt.getCode() ) )
                        {
                                content = attribute->second.back();
                                attribute->second.pop_back();
@@ -90,9 +115,9 @@ bool LdapBackend::get( DNSResourceRecord &rr )
                                rr.qname = m_qname;
                                rr.priority = 0;
 
-                               if( qt.getCode() == 15 )   // MX Record, e.g. 10 smtp.example.com
+                               if( qt.getCode() == QType::MX )   // MX Record, e.g. 10 smtp.example.com
                                {
-                                       stringtok( parts, content );
+                                       stringtok( parts, content, " " );
                                        rr.priority = (u_int16_t) strtol( parts[0].c_str(), NULL, 10 );
                                        content = parts[1];
                                }
index 6b79554137caac40026a6f33f7be214908bbaa1d..d34d3190d59a94649b00e46f7b8668205da5259e 100644 (file)
@@ -5,6 +5,7 @@
 #include <stdlib.h>
 #include <unistd.h>
 #include <pdns/dns.hh>
+#include <pdns/utility.hh>
 #include <pdns/dnspacket.hh>
 #include <pdns/dnsbackend.hh>
 #include <pdns/ueberbackend.hh>
@@ -23,6 +24,7 @@ using namespace std;
 static string backendname="[LdapBackend]";
 
 static char* attrany[] = {
+       "associatedDomain",
        "ARecord",
        "NSRecord",
        "CNAMERecord",
@@ -45,6 +47,8 @@ class LdapBackend : public DNSBackend
 private:
 
        int m_msgid;
+        int m_revlookup;
+  
        QType m_qtype;
        string m_qname;
        PowerLDAP* m_pldap;
index 7cf10f9f662bc43528f3ced9cb5290a8aa4f66d7..73e6129a5d9485029d0fb01fcec45eeb6308d066 100644 (file)
@@ -31,7 +31,7 @@ dynlistener.cc dynlistener.hh  dynhandler.cc dynhandler.hh  \
 resolver.hh resolver.cc communicator.cc communicator.hh dnsproxy.cc \
 dnsproxy.hh randombackend.cc unix_utility.cc common_startup.cc \
 utility.hh iputils.hh common_startup.hh \
-backends/bind/bindbackend.cc backends/bind/zoneparser2.cc \
+backends/bind/bindbackend2.cc backends/bind/zoneparser2.cc \
 backends/bind/bindparser.cc backends/bind/bindlexer.c \
 backends/bind/huffman.cc backends/gsql/gsqlbackend.cc \
 backends/gsql/gsqlbackend.hh backends/gsql/ssql.hh \
index 4aac0074e6be59b846e2e7b09a44bc81bbaa40ba..6eb394e3a806096ebcc688a94b5525c33030445c 100644 (file)
@@ -1,7 +1,7 @@
 INCLUDES=-I../..
 noinst_LTLIBRARIES = libbindbackend.la
 
-libbindbackend_la_SOURCES=bindbackend.cc bindbackend.hh bindparser.yy \
+libbindbackend_la_SOURCES=bindbackend2.cc bindbackend2.hh bindparser.yy \
 bindlexer.l zoneparser2.cc ../../misc.cc huffman.cc huffman.hh zoneparser.hh \
 bindparser.hh ../../unix_utility.cc
 
index 1edeb4cd4ec3cb8d5c979812d73b213e7c0f6689..37f41e6bfd271bd9decbda86f698d6120398c5c4 100644 (file)
@@ -45,7 +45,7 @@ class ZoneParser
   void setCallback(callback_t *callback);
   callback_t *d_callback;
   bool parseLine(const vector<string>&words, vector<Record> &);
-  bool eatLine(string line, vector<Record>&);
+  bool eatLine(const string& line, vector<Record>&);
   void setDirectory(const string &dir);
   static string canonic(const string& dom);
     
index 6a714a1f6e21386b80abff769d49c3b02cefbc4b..8c56b0c8cbfbaecb33b4c6fc11649cac3d4382fb 100644 (file)
@@ -65,14 +65,18 @@ void ZoneParser::parse(const string &fname, const string &origin, unsigned int d
   stack<FILE *>fds;
   fds.push(zonein);
 
+
   while(!fds.empty()) {
-    while(fgets(cline,sizeof(cline)-1,fds.top())) {
+    while(fgets_unlocked(cline,sizeof(cline)-1,fds.top())) {
       line=cline;
       chomp(line," \x1a\r\n");
       cutOff(line,";");
 
       d_lineno++;
-      if(!line.find("$INCLUDE ") || !line.find("$include ")) {
+      if(line.empty())
+       continue;
+
+      if(line[0]=='$' && (!line.find("$INCLUDE ") || !line.find("$include "))) {
        vector<string> parts;
        stringtok(parts,line," \t\n"); 
        if(parts.size()!=2)
@@ -121,14 +125,18 @@ void ZoneParser::parse(const string &fname, const string &origin, vector<Record>
   vector<Record> rec;
   stack<FILE *>fds;
   fds.push(zonein);
+
   while(!fds.empty()) {
-    while(fgets(cline,sizeof(cline)-1,fds.top())) {
+    while(fgets_unlocked(cline,sizeof(cline)-1,fds.top())) {
       line=cline;
       chomp(line," \x1a\r\n");
       cutOff(line,";");
 
       d_lineno++;
-      if(!line.find("$INCLUDE ") || !line.find("$include ")) {
+      if(line.empty())
+       continue;
+
+      if(line[0]=='$' && (!line.find("$INCLUDE ") || !line.find("$include "))) {
        vector<string> parts;
        stringtok(parts,line," \t\r\n");
        if(parts.size()!=2)
@@ -154,8 +162,6 @@ void ZoneParser::parse(const string &fname, const string &origin, vector<Record>
     fclose(fds.top());
     fds.pop();
   }
-  
-
 }
 
 
@@ -171,7 +177,6 @@ void ZoneParser::fillRec(const string &qname, const string &qtype, const string
   rec.ttl=ttl;
   rec.prio=prio;
   recs.push_back(rec);
-
 }
 
 
@@ -180,19 +185,18 @@ void ZoneParser::cutOff(string &line, const string &delim)
   unsigned int pos=line.find_first_of(delim);
   if(pos==string::npos)
     return;
-  line=line.substr(0,pos);
+  line.resize(pos);
 }
 
-bool ZoneParser::eatLine(string line, vector<Record> &rec)
+bool ZoneParser::eatLine(const string& line, vector<Record> &rec)
 {
-
   rec.clear();
   static string tline;
   static string lastfirstword;
   unsigned int pos=string::npos;
 
   if(tline.empty()) {
-    pos=line.find("(");
+    pos=line.find_first_of("(");
     if(pos!=string::npos) { // this is a line that continues
       tline=line.substr(0,pos);
       return false;
@@ -239,7 +243,7 @@ ZoneParser::~ZoneParser()
 
 void ZoneParser::setCallback(callback_t *callback)
 {
-       d_callback=callback;
+  d_callback=callback;
 }
 
 bool ZoneParser::isNumber(const string &s)
@@ -270,7 +274,7 @@ bool ZoneParser::isType(const string &s)
 
 bool ZoneParser::isClass(const string &s)
 {
-  return (s=="IN" || s=="CH" || s=="HS" || s=="in" || s=="ch" || s=="hs");
+  return (s.size()==2 && (s=="IN" || s=="CH" || s=="HS" || s=="in" || s=="ch" || s=="hs"));
 }
 
 unsigned int ZoneParser::zoneNumber(const string &str)
index ac6dbd806474ea636f8fc9686edc872800d71baa..4e37b6e384dade19472789d7f16dd2b11e08dd1a 100644 (file)
@@ -90,8 +90,6 @@ void declareArguments()
   arg().set("webserver-port","Port of webserver to listen on")="8081";
   arg().set("webserver-password","Password required for accessing the webserver")="";
 
-  arg().set("receiver-threads","Number of receiver threads to launch")="1";
-  
   arg().setSwitch("out-of-zone-additional-processing","Do out of zone additional processing")="no";
   arg().setSwitch("query-logging","Hint backends that queries should be logged")="no";
   
@@ -268,10 +266,8 @@ void mainthread()
     TN->go(); // tcp nameserver launch
     
   //  fork(); (this worked :-))
-  for(int n=0;n<arg().asNum("receiver-threads");++n) {
-    DNSDistributor *D= new DNSDistributor(arg().asNum("distributor-threads")); // the big dispatcher!
-    pthread_create(&qtid,0,qthread,static_cast<void *>(D)); // receives packets
-  }
+  DNSDistributor *D= new DNSDistributor(arg().asNum("distributor-threads")); // the big dispatcher!
+  pthread_create(&qtid,0,qthread,static_cast<void *>(D)); // receives packets
 
   void *p;
   pthread_join(qtid, &p);
index 66dc1e2d7a7a85deb7d4d482938efce1c51a92c0..0655fdeae8083bc10656e7b22592280667e41881 100644 (file)
@@ -11,7 +11,7 @@
       </affiliation>
     </author>
     
-    <PubDate>v2.1 $Date: 2003/02/15 11:30:17 $</PubDate>
+    <PubDate>v2.1 $Date: 2003/03/04 18:33:39 $</PubDate>
     
     <Abstract>
        <para>  
@@ -3308,15 +3308,16 @@ name         IN            A        1.2.3.4
   <Chapter id="configuring-db-connection">
     <title>Configure database connectivity</title>
     <para>
-      The default PDNS distribution comes with a simple MySQL backend built in, which we will now use for 
-      demonstrating database connectivity. This backend is called 'mysql', and needs to be configured
+      This chapter shows you how to configure the Generic MySQL backend, which we like a lot. But feel free to use any of the myriad
+      other backends.
+      This backend is called 'gmysql', and needs to be configured
       in <filename>pdns.conf</filename>. Add the following lines, adjusted for your local setup:
       
       <screen>
-       launch=mysql
-       mysql-host=127.0.0.1
-       mysql-user=root
-       mysql-dbname=pdnstest
+       launch=gmysql
+       gmysql-host=127.0.0.1
+       gmysql-user=root
+       gmysql-dbname=pdnstest
       </screen>
       
       Remove any earlier <command>launch</command> statements. Also remove the <command>bind-example-zones</command>
@@ -3331,8 +3332,8 @@ name         IN            A        1.2.3.4
       </warning>
       <warning>
        <para>
-         This section describes the deprecated MySQL backend, which should no longer be used! Use the Generic MySQL backend! See
-         <xref linkend="generic-mypgsql-backends">.
+         Be very very sure that you configure the *g*mysql backend and not the mysql backend. See
+         <xref linkend="generic-mypgsql-backends">. If you use the 'mysql' backend things will only appear to work.
        </para>
       </warning>
     </para>
@@ -3343,9 +3344,9 @@ name         IN            A        1.2.3.4
        (...)
        15:31:30 PowerDNS 1.99.0 (Mar 12 2002, 15:00:28) starting up
        15:31:30 About to create 3 backend threads
-       15:31:30 [MySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest'
-       15:31:30 [MySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest'
-       15:31:30 [MySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest'
+       15:31:30 [gMySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest'
+       15:31:30 [gMySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest'
+       15:31:30 [gMySQLbackend] Failed to connect to database: Error: Unknown database 'pdnstest'
       </screen>
       
       This is as to be expected - we did not yet add anything to MySQL for PDNS to read from. At this point you may also see
@@ -3359,24 +3360,44 @@ name         IN            A        1.2.3.4
       <para>
        Connect to MySQL as a user with sufficient privileges and issue the following commands:
        <screen>
-         # mysql 
-         mysql> CREATE DATABASE pdnstest;
-         mysql> use pdnstest;
+create table domains (
+ id             INT auto_increment,
+ name           VARCHAR(255) NOT NULL,
+ master                 VARCHAR(20) DEFAULT NULL,
+ last_check     INT DEFAULT NULL,
+ type           VARCHAR(6) NOT NULL,
+ notified_serial INT DEFAULT NULL, 
+ account         VARCHAR(40) DEFAULT NULL,
+ primary key (id)
+)type=InnoDB;
 
-         mysql> CREATE TABLE records (
-         id int(11) NOT NULL auto_increment,
-         domain_id int(11) NOT NULL,
-         name varchar(255) NOT NULL,
-         type varchar(6) NOT NULL,
-         content varchar(255) default NULL,
-         ttl int(11) NOT NULL,
-         prio int(11) default NULL,
-         change_date int(11) default NULL,
-         PRIMARY KEY (id),
-         KEY name_index(name),
-         KEY nametype_index(name,type),
-         KEY domainid_index(domain_id)
-         );
+CREATE UNIQUE INDEX name_index ON domains(name);
+
+CREATE TABLE records (
+  id              INT auto_increment,
+  domain_id       INT DEFAULT NULL,
+  name            VARCHAR(255) DEFAULT NULL,
+  type            VARCHAR(6) DEFAULT NULL,
+  content         VARCHAR(255) DEFAULT NULL,
+  ttl             INT DEFAULT NULL,
+  prio            INT DEFAULT NULL,
+  change_date     INT DEFAULT NULL,
+  primary key(id)
+)type=InnoDB;
+
+CREATE INDEX rec_name_index ON records(name);
+CREATE INDEX nametype_index ON records(name,type);
+CREATE INDEX domain_id ON records(domain_id);
+
+create table supermasters (
+  ip VARCHAR(25) NOT NULL, 
+  nameserver VARCHAR(255) NOT NULL, 
+  account VARCHAR(40) DEFAULT NULL
+);
+
+GRANT SELECT ON supermasters TO pdns;
+GRANT ALL ON domains TO pdns;
+GRANT ALL ON records TO pdns;
        </screen>
        
        Now we have a database and an empty table. PDNS should now be able to launch in monitor mode and display no errors:
@@ -3386,9 +3407,9 @@ name         IN            A        1.2.3.4
          (...)
          15:31:30 PowerDNS 1.99.0 (Mar 12 2002, 15:00:28) starting up
          15:31:30 About to create 3 backend threads
-         15:39:55 [MySQLbackend] MySQL connection succeeded
-         15:39:55 [MySQLbackend] MySQL connection succeeded
-         15:39:55 [MySQLbackend] MySQL connection succeeded
+         15:39:55 [gMySQLbackend] MySQL connection succeeded
+         15:39:55 [gMySQLbackend] MySQL connection succeeded
+         15:39:55 [gMySQLbackend] MySQL connection succeeded
        </screen>
        
        A sample query sent to the database should now return quickly without data:
@@ -3405,7 +3426,7 @@ name         IN            A        1.2.3.4
        Now we need to add some records to our database:
        <screen>
          # mysql pdnstest
-         mysql>
+         mysql> INSERT INTO domains (name, type) values ('test.com', 'NATIVE');
          INSERT INTO records (domain_id, name, content, type,ttl,prio) 
          VALUES (1,'test.com','localhost ahu@ds9a.nl 1','SOA',86400,NULL);
          INSERT INTO records (domain_id, name, content, type,ttl,prio)
@@ -3473,11 +3494,11 @@ name         IN            A        1.2.3.4
                <para>
                  Your MySQL installation is probably defaulting to another location for its socket. Can be resolved
                  by figuring out this location (often <filename>/var/run/mysqld.sock</filename>), and specifying it 
-                 in the configuration file with the <command>mysql-socket</command> parameter.
+                 in the configuration file with the <command>gmysql-socket</command> parameter.
                </para>
                <para>
                  Another solution is to not connect to the socket, but to 127.0.0.1, which can be achieved by specifying
-                 <command>mysql-host=127.0.0.1</command>.
+                 <command>gmysql-host=127.0.0.1</command>.
                </para>
              </listitem>
            </varlistentry>
index 343f1d62eacf11d686926f8f5495870666ff8843..dce2f25b5489d88a8ad8e836320edd03c8de58aa 100644 (file)
@@ -45,10 +45,13 @@ DynMessenger::DynMessenger(const string &localdir, const string &fname)
   
   unlink(d_local.sun_path);
   
-  if(bind(d_s, (sockaddr*)&d_local,sizeof(d_local))<0) 
+  if(bind(d_s, (sockaddr*)&d_local,sizeof(d_local))<0) {
+    unlink(d_local.sun_path);
     throw AhuException("Unable to bind to local temporary file: "+string(strerror(errno)));
+  }
   
   if(chmod(d_local.sun_path,0666)<0) { // make sure that pdns can reply!
+    unlink(d_local.sun_path);
     perror("fchmod");
     exit(1);
   }
@@ -57,8 +60,10 @@ DynMessenger::DynMessenger(const string &localdir, const string &fname)
   
   d_remote.sun_family=AF_UNIX;
   strcpy(d_remote.sun_path,fname.c_str());
-  if(connect(d_s,(sockaddr*)&d_remote,sizeof(d_remote))<0) 
+  if(connect(d_s,(sockaddr*)&d_remote,sizeof(d_remote))<0) {
+    unlink(d_local.sun_path);
     throw AhuException("Unable to connect to remote '"+fname+"': "+string(strerror(errno)));
+  }
   
 }
 
index 2ee5ca8bfc30bad5a9ddf5b1c7dea6d4199c4696..10e7ce85a05d04fdb698d84344a102f60e001e9a 100644 (file)
@@ -391,6 +391,9 @@ int main(int argc, char **argv)
       FD_ZERO( &readfds );
       FD_SET( d_clientsock, &readfds );
       FD_SET( d_serversock, &readfds );
+
+
+      /* this should listen on a TCP port as well for new connections,  */
       int selret = select( max(d_clientsock,d_serversock) + 1, &readfds, NULL, NULL, &tv );
       if(selret<=0) 
        if (selret == -1 && errno!=EINTR) 
index 6f6d45e251b9ecde5561ce84381d4fdad3446333..a132fff75377ca2118331ace6ac60a6aacdf7695 100644 (file)
@@ -1,6 +1,6 @@
 /*
     PowerDNS Versatile Database Driven Nameserver
-    Copyright (C) 2002  PowerDNS.COM BV
+    Copyright (C) 2003  PowerDNS.COM BV
 
     This program is free software; you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
-// $Id: receiver.cc,v 1.6 2003/01/02 15:43:00 ahu Exp $
+// $Id: receiver.cc,v 1.7 2003/03/04 18:33:39 ahu Exp $
 #include <cstdio>
 #include <signal.h>
 #include <cstring>
@@ -540,7 +540,7 @@ int main(int argc, char **argv)
   declareStats();
   DLOG(L<<Logger::Warning<<"Verbose logging in effect"<<endl);
   
-  L<<Logger::Warning<<"PowerDNS "<<VERSION<<" (C) 2002 PowerDNS.COM BV ("<<__DATE__", "__TIME__<<") starting up"<<endl;
+  L<<Logger::Warning<<"PowerDNS "<<VERSION<<" (C) 2001-2003 PowerDNS.COM BV ("<<__DATE__", "__TIME__<<") starting up"<<endl;
 
   L<<Logger::Warning<<"PowerDNS comes with ABSOLUTELY NO WARRANTY. "
     "This is free software, and you are welcome to redistribute it "
index ee8a8b2d1d04a8d53d4b59a966fc7a889f80c34a..fc3cf214f4ad3a70de582c6d95ab939a10b71b5a 100644 (file)
@@ -171,6 +171,8 @@ void *TCPNameserver::doConnection(void *data)
       if(packet->d.rd && arg().mustDo("recursor")) {
        // now what
        // this is a pretty rare event all in all, so we can afford to be slow
+
+       // this code SHOULD attempt to answer from the local cache first!
        S.inc("recursing-questions");
        Resolver res;
        unsigned int len;