]> granicus.if.org Git - pdns/commitdiff
lots
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 14 Feb 2003 19:55:02 +0000 (19:55 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 14 Feb 2003 19:55:02 +0000 (19:55 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@151 d19b8d6e-7fed-0310-83ef-9ca221ded41b

ChangeLog
TODO
configure.in
debian/changelog
modules/ldapbackend/dns.ldif
pdns/backends/bind/zoneparser2.cc
pdns/communicator.cc
pdns/docs/pdns.sgml
pdns/misc.cc
pdns/resolver.cc
pdns/syncres.cc

index 7ac1e861ed61c57f146a21ea6ff2cd0a6844cc49..a09b736ebe3b9e816a92c9ff4bcc986316959a31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Changes since 2.9.6:
+       - implemented isMaster in bindbackend (we now react to notifies)
+       - added zoneId to mboxfw stuff - massive speedup
+       - $GENERATE off by one bug (Christian Laursen)
+       - Outgoing AXFR crashes with certain backends or frequent AXFRs
+               (thanks to ISP Services for testing this in production)
+       - GODBC
+       - LDAP
+       - possible issue resolved with case differences in domain names and incoming AXFR
+       - now also accept 'in' as 'IN' (noted by Joris Vandalon)
+       - $include fixed, sometimes lost a " or the last character (noted by Joris Vandalon)
+
 Changes since 2.9.4:
        - heap of work in shortening dnspacket.cc (factor out common operations)
        - work on recursor
diff --git a/TODO b/TODO
index 44f08d7ce7ed4fbcba218134da13a88c3358ab0c..6274ab99f84d0343c04b4148dcd360bb95d31f3e 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,4 +1,8 @@
 
+* new zone is AXFRed, written to disk succesfully
+       probably? unsure
+* the old SOA record remains in place
+
 bugs:
        pdns.conf-dist contains old descriptions
 
index 4e21df632a3a5ee2fbc80d6ad847dee396bb4546..102d3be8051c4837cc8f3b7f0541fddb263b3cb8 100644 (file)
@@ -1,6 +1,6 @@
 dnl intro
 AC_INIT(pdns/receiver.cc)
-AM_INIT_AUTOMAKE(pdns, 2.9.5)
+AM_INIT_AUTOMAKE(pdns, 2.9.6)
 AC_CANONICAL_HOST
 AM_CONFIG_HEADER(config.h)
 AC_C_BIGENDIAN 
@@ -340,4 +340,4 @@ modules/mysqlbackend/Makefile modules/pdnsbackend/Makefile \
 modules/gmysqlbackend/Makefile modules/db2backend/Makefile \
 modules/pipebackend/Makefile modules/oraclebackend/Makefile \
 modules/xdbbackend/Makefile modules/odbcbackend/Makefile \
-modules/gpgsqlbackend/Makefile )
+modules/gpgsqlbackend/Makefile modules/ldapbackend/Makefile )
index 9a887f2425b49fd0a633e21660920a1b76d18a9b..7426ea9402a72ca40501015e9a5381bd8d6da70a 100644 (file)
@@ -1,3 +1,9 @@
+pdns (2.9.6-1) unstable; urgency=low
+
+  * fill in the blanks
+
+ -- Wichert Akkerman <wakkerma@debian.org>  Fri, 14 Feb 2003 20:16:16 +0100
+
 pdns (2.9.5-1) unstable; urgency=low
 
   * fill in the blanks
index 3889d3f5ccd330c26e60907d016327d383d76809..c5861a25335a18bc164db5b2a70d336e0b9124bc 100644 (file)
@@ -1,6 +1,6 @@
 # zone related things including SOA, NS and MX records
 
-dn: dc=snapcount
+dn: dc=example
 objectclass: top
 objectclass: dnsdomain
 objectclass: domainrelatedobject
@@ -14,7 +14,7 @@ associateddomain: example.dom
 
 # Simple record (mail.example.dom has address 172.168.0.2)
 
-dn: dc=mail,dc=snapcount
+dn: dc=mail,dc=example
 objectclass: top
 objectclass: dnsdomain
 objectclass: domainrelatedobject
@@ -27,7 +27,7 @@ associateddomain: mail.example.dom
 # This is also applicable to all other records including "associateddomain"
 # but not for a CNAME record
 
-dn: dc=server,dc=snapcount
+dn: dc=server,dc=example
 objectclass: top
 objectclass: dnsdomain
 objectclass: domainrelatedobject
@@ -40,7 +40,7 @@ associateddomain: server.example.dom
 # domain alias ({mail2,ns}.example.dom is CNAME for server.example.dom)
 # cnamerecord must only contain one entry
 
-dn: dc=backup,dc=snapcount
+dn: dc=backup,dc=example
 objectclass: top
 objectclass: dnsdomain
 objectclass: domainrelatedobject
index a1b6fd2c77b3b8b16868442eecdd6754af6a883d..11220e6b8e66c8496e4293bce6e3003678a2347a 100644 (file)
@@ -124,7 +124,7 @@ void ZoneParser::parse(const string &fname, const string &origin, vector<Record>
       d_lineno++;
       if(!line.find("$INCLUDE ") || !line.find("$include ")) {
        vector<string> parts;
-       stringtok(parts,line," \t\n");
+       stringtok(parts,line," \t\r\n");
        if(parts.size()!=2)
          throw AhuException("Invalid $INCLUDE statement in zonefile '"+fname+"'");
 
@@ -258,7 +258,7 @@ bool ZoneParser::isType(const string &s)
 
 bool ZoneParser::isClass(const string &s)
 {
-  return (s=="IN" || s=="CH" || s=="HS");
+  return (s=="IN" || s=="CH" || s=="HS" || s=="in" || s=="ch" || s=="hs");
 }
 
 unsigned int ZoneParser::zoneNumber(const string &str)
index b5d45d154519168c83327592063dd89798e11e62..76ce2ff528e4abdaece07a7f5dee3198af711ce0 100644 (file)
@@ -75,7 +75,7 @@ void CommunicatorClass::suck(const string &domain,const string &remote)
        first=false;
       }
       for(Resolver::res_t::iterator i=recs.begin();i!=recs.end();++i) {
-       if((i->qname.size()-toLower(i->qname).rfind(toLower(domain)))!=domain.size()) { // move this to endsOn FIXME XXX
+       if(!endsOn(i->qname, domain)) { 
          L<<Logger::Error<<"Remote "<<remote<<" sneaked in out-of-zone data '"<<i->qname<<"' during AXFR of zone '"<<domain<<"'"<<endl;
          di.backend->abortTransaction();
          return;
index 774bdbc2f975bfce6c362f88efe9da7709396879..7cda7ff9da21dc5f9fe9005fbdcd38676ac3c20e 100644 (file)
@@ -11,7 +11,7 @@
       </affiliation>
     </author>
     
-    <PubDate>v2.1 $Date: 2003/02/10 11:09:09 $</PubDate>
+    <PubDate>v2.1 $Date: 2003/02/14 19:55:02 $</PubDate>
     
     <Abstract>
        <para>  
        Before proceeding, it is advised to check the release notes for your PDNS version, as specified in the name of the distribution
        file.
       </para>
+      <sect2 id="changelog-2-9-6"><title>Version 2.9.6</title> 
+       <para>
+         Two new backends - Generic ODBC and LDAP. Furthermore, a few important bugs have been fixed which may have hampered sites seeing a lot of 
+         outgoing zonetransfers. Additionally, the pdns recursor now has 'query throttling' which is pretty cool. In short this makes sure that PowerDNS 
+         does not send out heaps of queries if a nameserver is unable to provide an answer. Many operators of authoritative setups are all too aware of 
+         recursing nameservers that hammer them for zones they don't have, PowerDNS won't do that anymore now, no matter what clients request of it.
+       </para>
+       <para>
+         <warning>
+           <para>
+             There is an unresolved issue with the BIND backend and 'overlapping' slave zones. So if you have 'example.com' and also have a separate 
+             slave zone called 'external.example.com', things may go wrong badly. Thanks to Christian Laursen for working with us a lot in finding
+             this issue. We hope to resolve it soon.
+           </para>
+         </warning>
+       <para>
+         <itemizedlist>
+           <listitem>
+             <para>
+               BIND Backend now honours notifies, code to support this was accidentally left out. Thanks to Christian Laursen for noticing this.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Massive speedup for those of you using the slightly deprecated MBOXFW records. Thanks to Jorn of <ulink url="http://www.ISP-Services.nl">
+                 ISP Services</ulink> for helping and testing this improvement.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               $GENERATE had an off-by-one bug where it would omit the last record to be generated (Christian Laursen)
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Simultaneous AXFRs may have been problematic on some backends. Thanks to Jorn of ISP-Services again for helping us resolve this issue.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Added LDAP backend by Norbert Sendetzky, see <xref linkend="ldap">.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Added Generic ODBC backend by Michel Stol.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Simplified 'out of zone data' detection in incoming AXFR support, hopefully removing a case sensitivity bug there. Thanks again
+               to Christian Laursen for reporting this issue.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               $include in-zonefile was broken under some circumstances, losing the last character of a filename. Thanks to Joris Vandalon for noticing this.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               The zoneparser was more case-sensitive than BIND, refusing to accept 'in' as well as 'IN'. Thanks to Joris Vandalon for noticing this.
+             </para>
+           </listitem>
+         </itemizedlist>
+       </para>
+      </sect2>
       <sect2 id="changelog-2-9-5"><title>Version 2.9.5</title> 
        <para>
          Released on 2002-02-03.
@@ -4182,10 +4249,55 @@ local0.err                        /var/log/pdns.err
        </variablelist>
       <para>
     </sect1>
+    <sect1><title>Details</title>
+      <para>
+       PowerDNS implements a very simple but effective nameserver. Care has been taken not to overload remote servers in case
+       of overly active clients.
+      </para>
+      <para>
+       This is implemented using the 'throttle'. This accounts all recent traffic and prevents queries that have been sent out
+       recently from going out again.
+      </para>
+      <para>
+       There are three levels of throttling.
+       <itemizedlist>
+         <listitem>
+           <para>
+             If a remote server indicates that it is lame for a zone, the exact question won't
+             be repeated in the next 60 seconds.
+           </para>
+         </listitem>
+         <listitem>
+           <para>
+             After 4 ServFail responses in 60 seconds, the query gets throttled too.
+           </para>
+         </listitem>
+         <listitem>
+           <para>
+             5 timeouts in 20 seconds also lead to query suppression.
+           </para>
+         </listitem>
+       </itemizedlist>
+      </para>
+    </sect1>
     <sect1><title>Statistics</title>
       <para>
        Every half our or so, the recursor outputs a line with statistics. More infrastructure is planned so as to allow
-       for Cricket or MRTG graphs.
+       for Cricket or MRTG graphs. To force the output of statistics, send the process a SIGUSR1. A line of statistics looks 
+       like this:
+<screen>
+Feb 10 14:16:03 stats: 125784 questions, 13971 cache entries, 309 negative entries, 84% cache hits, outpacket/query ratio 37%, 12% throttled
+</screen>
+       This means that there are 13791 different names cached, which each may have multiple records attached to them. There are 309 items
+       in the negative cache, items of which it is known that don't exist and won't do so for the near future. 84% of incoming questions
+       could be answered without any additional queries going out to the net.
+      </para>
+      <para>
+       The outpacket/query ratio means that on average, 0.37 packets were needed to answer a question. Initially this ratio may be well over 100%
+       as additional queries may be needed to actually recurse the DNS and figure out the addresses of nameservers.
+      </para>
+      <para>
+       Finally, 12% of queries were not performed because identical queries had gone out previously, saving load servers worldwide.
       </para>
     </sect1>
   </chapter>
@@ -7118,7 +7230,7 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE
            <term>ldap-host</term>
            <listitem>
              <para>
-               LDAP host to connect to.
+               LDAP host to connect to, defaults to localhost.
              </para>
            </listitem>
          </varlistentry>
@@ -7131,10 +7243,10 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE
            </listitem>
          </varlistentry>
          <varlistentry>
-           <term>ldap-basdn</term>
+           <term>ldap-basedn</term>
            <listitem>
              <para>
-               Root for DNS searches. Defaults to the empty string.
+               Root for DNS searches. Must be configured before the LDAP backend will work.
              </para>
            </listitem>
          </varlistentry>
@@ -7142,7 +7254,7 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE
            <term>ldap-binddn</term>
            <listitem>
              <para>
-               Distinguished Name to bind with to the LDAP server.
+               Distinguished Name to bind with to the LDAP server. Defaults to the empty string for anonymous bind.
              </para>
            </listitem>
          </varlistentry>
@@ -7150,22 +7262,19 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE
            <term>ldap-secret</term>
            <listitem>
              <para>
-               Secret to bind with to LDAP server.
+               Secret to bind with to LDAP server. Defaults to the empty string for anonymous bind.
              </para>
            </listitem>
          </varlistentry>
        </variablelist>
       </para>
       <para>
-       The schema used is as follows:
+       The schema used is that defined by RFC 1279 and is present in OpenLDAP under the name 'cosine.schema'.
+       An example LDIF file:
        <screen>
-         objectclass: top
-objectclass: dnsdomain
-objectclass: domainrelatedobject
-dc: example
 # zone related things including SOA, NS and MX records
 
-dn: dc=snapcount
+dn: dc=example
 objectclass: top
 objectclass: dnsdomain
 objectclass: domainrelatedobject
@@ -7179,18 +7288,41 @@ associateddomain: example.dom
 
 # Simple record (mail.example.dom has address 172.168.0.2)
 
-dn: dc=mail,dc=snapcount
+dn: dc=mail,dc=example
 objectclass: top
 objectclass: dnsdomain
 objectclass: domainrelatedobject
 dc: mail
 arecord: 172.168.0.2
 associateddomain: mail.example.dom
+
+# There may more than one entry per record
+# This is also applicable to all other records including "associateddomain"
+# but not for a CNAME record
+
+dn: dc=server,dc=snapcount
+objectclass: top
+objectclass: dnsdomain
+objectclass: domainrelatedobject
+dc: server
+arecord: 10.1.0.1
+arecord: 172.168.0.1
+associateddomain: server.example.dom
+
+
+# domain alias ({mail2,ns}.example.dom is CNAME for server.example.dom)
+# cnamerecord must only contain one entry
+
+dn: dc=backup,dc=snapcount
+objectclass: top
+objectclass: dnsdomain
+objectclass: domainrelatedobject
+dc: server
+cnamerecord: server.example.dom
+associateddomain: mail2.example.dom
+associateddomain: ns.example.dom
 </screen>
       </para>
-      <para>
-       More details are forthcoming.
-      </para>
     </sect1>
   </appendix>
 <appendix id="pdns-internals"><title>PDNS internals</title>
index 0a296bd45e1d5fb202246638452241baf21a242e..e19cb09c7c23dad0c29a4ee08d57cf2864c643d3 100644 (file)
@@ -21,6 +21,7 @@
 #include <sstream>
 #include <errno.h>
 #include <cstring>
+#include <iostream>
 
 #include <iomanip>
 #include <string.h>
@@ -75,11 +76,10 @@ u_int32_t getLong(const char* p)
 /** strips a domain suffix from a domain, returns true if it stripped */
 bool stripDomainSuffix(string *qname, const string &domain)
 {
-  if((qname->size()-toLower(*qname).rfind(toLower(domain)))!=domain.size()) {   
+  if(!endsOn(*qname, domain))
     return false;
 
-  }
-  if(*qname==domain)
+  if(toLower(*qname)==toLower(domain))
     *qname="@";
   else {
     if((*qname)[qname->size()-domain.size()-1]!='.')
@@ -261,12 +261,14 @@ const string unquotify(const string &item)
 
   string::size_type bpos=0, epos=item.size();
 
-  if(item[0]=='"')
+  if(item[0]=='"') 
     bpos=1;
+
+  cout<<"wuh: '"<<item[epos-1]<<"'"<<endl;
   if(item[epos-1]=='"')
     epos-=1;
 
-  return item.substr(bpos,epos-1);
+  return item.substr(bpos,epos-bpos);
 }
 
 void stripLine(string &line)
index f513a92410c3bd5b4020cda83bfb9d59a0c03e9c..cdf6ab471f354abc4a5b9bdd736251e45a45981d 100644 (file)
@@ -356,7 +356,6 @@ int Resolver::axfrChunk(Resolver::res_t &res)
 
   if(d_soacount>1 && !res.empty()) // chop off the last SOA
     res.resize(res.size()-1);
-    
 
   return 1;
 }
index d113242d9561d435ad89553115b91f581c27982c..acd0d4bbdca39e13c978262153628c5f2343647d 100644 (file)
@@ -308,7 +308,7 @@ int SyncRes::doResolveAt(set<string> nameservers, string auth, const string &qna
        d_outqueries++;
        if(d_lwr.asyncresolve(remoteIP,qname.c_str(),qtype.getCode())!=1) { // <- we go out on the wire!
          LOG<<prefix<<qname<<": error resolving (perhaps timeout?)"<<endl;
-         s_throttle.throttle(remoteIP+"|"+qname+"|"+qtype.getName(),20,20);
+         s_throttle.throttle(remoteIP+"|"+qname+"|"+qtype.getName(),20,5);
          continue;
        }
       }