]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
cleanup, remove whitespace
authorKees Monshouwer <mind04@monshouwer.org>
Sat, 13 Jul 2013 09:06:19 +0000 (11:06 +0200)
committermind04 <mind04@monshouwer.org>
Thu, 18 Jul 2013 13:07:45 +0000 (15:07 +0200)
34 files changed:
pdns/backends/gsql/gsqlbackend.cc
pdns/common_startup.cc [changed mode: 0755->0644]
pdns/dns.hh
pdns/dnspacket.cc
pdns/dnsparser.cc [changed mode: 0755->0644]
pdns/dnsrecords.cc
pdns/dnssecinfra.cc
pdns/docs/pdns.xml
pdns/packetcache.cc
pdns/packethandler.cc
pdns/qtype.cc
pdns/qtype.hh
pdns/resolver.cc
pdns/rfc2136handler.cc
regression-tests/0dyndns-prereq-all/command
regression-tests/0dyndns-prereq-all/description
regression-tests/1dyndns-update-add-delete-casesensative/description
regression-tests/1dyndns-update-add-delete-cname/command
regression-tests/1dyndns-update-add-delete-mx/description
regression-tests/1dyndns-update-add-delete-wildcard/command
regression-tests/1dyndns-update-add-invalid-record/description
regression-tests/1dyndns-update-add-invalid-record/sendupdate.pl
regression-tests/1dyndns-update-delegate-in-between/command
regression-tests/1dyndns-update-delegate/command
regression-tests/1dyndns-update-delete-mx-prio/command
regression-tests/1dyndns-update-delete-ns/command
regression-tests/1dyndns-update-nsec3params-with-others/command
regression-tests/1dyndns-update-nsec3params/command
regression-tests/1dyndns-update-nsec3params/description
regression-tests/1dyndns-update-replace-mx/command
regression-tests/1dyndns-update-replace-mx/description
regression-tests/2dyndns-update-replace-soa/description
regression-tests/runtests
regression-tests/start-test-stop

index 63217e463e138574e23b0f3da95b3b70b8568199..ec135e677ac16b668ef858854ad2e9ef4b551ca0 100644 (file)
@@ -346,6 +346,7 @@ bool GSQLBackend::nullifyDNSSECOrderNameAndUpdateAuth(uint32_t domain_id, const
   if(!d_dnssecQueries)
     return false;
   char output[1024];
+
   snprintf(output, sizeof(output)-1, d_nullifyOrderNameAndUpdateAuthQuery.c_str(), auth, domain_id, sqlEscape(qname).c_str());
   try {
     d_db->doCommand(output);
@@ -361,6 +362,7 @@ bool GSQLBackend::nullifyDNSSECOrderNameAndAuth(uint32_t domain_id, const std::s
   if(!d_dnssecQueries)
     return false;
   char output[1024];
+
   snprintf(output, sizeof(output)-1, d_nullifyOrderNameAndAuthQuery.c_str(), sqlEscape(qname).c_str(), sqlEscape(type).c_str(), domain_id);
   try {
     d_db->doCommand(output);
@@ -901,7 +903,7 @@ bool GSQLBackend::get(DNSResourceRecord &r)
 
 bool GSQLBackend::replaceRRSet(uint32_t domain_id, const string& qname, const QType& qt, const vector<DNSResourceRecord>& rrset)
 {
-  string deleteQuery; 
+  string deleteQuery;
   string deleteRRSet;
   if (qt != QType::ANY) {
     deleteRRSet = "delete from records where domain_id = %d and name='%s' and type='%s'";
old mode 100755 (executable)
new mode 100644 (file)
index 7f35aac..d126cd9
@@ -77,6 +77,7 @@ void declareArguments()
   ::arg().set("recursor","If recursion is desired, IP address of a recursing nameserver")="no"; 
   ::arg().set("allow-recursion","List of subnets that are allowed to recurse")="0.0.0.0/0";
   ::arg().set("pipebackend-abi-version","Version of the pipe backend ABI")="1";
+
   ::arg().set("udp-truncation-threshold", "Maximum UDP response size before we truncate")="1680";
   ::arg().set("disable-tcp","Do not listen to TCP queries")="no";
   ::arg().set("disable-axfr","Do not allow zone transfers")="no";
@@ -180,7 +181,6 @@ void declareStats(void)
   S.declare("rfc2136-refused", "RFC2136 packets that are refused.");
   S.declare("rfc2136-changes", "RFC2136 changes to records in total.");
 
-
   S.declare("servfail-packets","Number of times a server-failed packet was sent out");
   S.declare("latency","Average number of microseconds needed to answer a question");
   S.declare("timedout-packets","Number of packets which weren't answered within timeout set");
index 1de3c203b7a8b2988c8da1d577e374092956edd2..4fafa8051db6c03137a8df048b66e5033e4a5fb0 100644 (file)
@@ -110,7 +110,7 @@ public:
     ar & d_place;
     ar & auth;
   }
-  
+
   bool operator==(const DNSResourceRecord& rhs);
 
   bool operator<(const DNSResourceRecord &b) const
index aa43c4d8a561e3f0ce70f5ca26c7bc54b3fa3feb..27fc3b1e50c3d2c99a0b50a5936864724058b162 100644 (file)
@@ -43,8 +43,8 @@
 
 bool DNSPacket::s_doEDNSSubnetProcessing;
 uint16_t DNSPacket::s_udpTruncationThreshold;
-DNSPacket::DNSPacket() 
+
+DNSPacket::DNSPacket()
 {
   d_wrapped=false;
   d_compress=true;
old mode 100755 (executable)
new mode 100644 (file)
index 5554b97..be40fea
@@ -176,7 +176,7 @@ DNSRecordContent* DNSRecordContent::mastermake(const DNSRecord &dr, PacketReader
   // For section 3.2.3, we do need content so we need to get it properly. But only for the correct Qclasses.
   if (oc == Opcode::Update && dr.d_place == DNSRecord::Answer && dr.d_class != 1)
     return new UnknownRecordContent(dr, pr);
-  
+
   uint16_t searchclass = (dr.d_type == QType::OPT) ? 1 : dr.d_class; // class is invalid for OPT
 
   typemap_t::const_iterator i=getTypemap().find(make_pair(searchclass, dr.d_type));
index 35d863a9ee871ba270c361dbe4ca6342ae89717a..7859d8b333f48abe24e6ad4720741bcc0399da90 100644 (file)
@@ -67,11 +67,11 @@ bool DNSResourceRecord::operator==(const DNSResourceRecord& rhs)
 {
   string lcontent=toLower(content);
   string rcontent=toLower(rhs.content);
-   
+
   string llabel=toLower(qname);
   string rlabel=toLower(rhs.qname);
-    
-  return 
+
+  return
     tie(llabel, qtype, lcontent, ttl, priority) ==
     tie(rlabel, rhs.qtype, rcontent, rhs.ttl, rhs.priority);
 }
@@ -83,7 +83,7 @@ DNSResourceRecord::DNSResourceRecord(const DNSRecord &p) {
   qname = p.d_label;
   if(!qname.empty())
     boost::erase_tail(qname, 1); // strip .
-  
+
   qtype = p.d_type;
   ttl = p.d_ttl;
   priority=0;
index 199a8cd73395fd9d87adc92ff85ac2353f2a07d6..82f76200f26053879f178a6a3da33ff40bd72139 100644 (file)
@@ -477,7 +477,7 @@ string makeTSIGMessageFromTSIGPacket(const string& opacket, unsigned int tsigOff
     dw.xfrLabel(keyname, false);
     dw.xfr16BitInt(0xff); // class
     dw.xfr32BitInt(0);    // TTL
-    dw.xfrLabel(toLower(trc.d_algoName), false); 
+    dw.xfrLabel(toLower(trc.d_algoName), false);
   }
   
   uint32_t now = trc.d_time; 
index 54fcea6587ab0b6c6b05ad52b51ca688a994ca9c..662e1b82be4e6de7e06719f50efdd933e71fdb1c 100755 (executable)
@@ -13229,8 +13229,8 @@ sql> insert into domainmetadata (domain_id, kind, content) values (7,'ALLOW-AXFR
           <term>ALLOW-2136-FROM</term>
           <listitem>
             <para>
-              This setting has the same function as described in the configuration options (See <xref linkend="rfc2136-configuration" />). 
-              Only one item is allowed per row, but multiple rows can be added. 
+              This setting has the same function as described in the configuration options (See <xref linkend="rfc2136-configuration" />).
+              Only one item is allowed per row, but multiple rows can be added.
               An example:
               <programlisting>
 sql> select id from domains where name='powerdnssec.org';
@@ -13238,7 +13238,7 @@ sql> select id from domains where name='powerdnssec.org';
 sql> insert into domainmetadata(domain_id, kind, content) values(5, ‘ALLOW-2136-FROM’,’10.0.0.0/8’);
 sql> insert into domainmetadata(domain_id, kind, content) values(5, ‘ALLOW-2136-FROM’,’192.168.1.2/32’);
               </programlisting>
-              
+
               This will allow 10.0.0.0/8 and 192.168.1.2/32 to send RFC2136 update messages for the powerdnssec.org domain.
             </para>
           </listitem>
@@ -13256,10 +13256,10 @@ sql> select id from domains where name='powerdnssec.org';
 5
 sql> insert into domainmetadata (domain_id, kind, content) values (5, 'TSIG-ALLOW-2136', 'test');
             </programlisting>
-              
+
             <para>An example of how to use a TSIG key with the <command>nsupdate</command> command:</para>
             <programlisting>
-nsupdate &lt;&lt;! 
+nsupdate &lt;&lt;!
 server &lt;ip&gt; &lt;port&gt;
 zone powerdnssec.org
 update add test1.powerdnssec.org 3600 A 192.168.1.1
@@ -13268,7 +13268,7 @@ send
 !
             </programlisting>
             <para>
-              If a TSIG key is set for the domain, it is required to be used for the update. 
+              If a TSIG key is set for the domain, it is required to be used for the update.
               The TSIG is extra security on top of the <command>ALLOW-2136-FROM</command> setting.
               If a TSIG key is set, the IP(-range) still needs to be allowed via <command>ALLOW-2136-FROM</command>.
             </para>
@@ -13284,7 +13284,7 @@ sql> select id from domains where name='powerdnssec.org';
 5
 sql> insert into domainmetadata(domain_id, kind, content) values(5, ‘FORWARD-2136’,’’);
               </programlisting>
-              
+
               There is no content, the existance of the entry enables the forwarding.
               This domain-specific setting is only useful when the configuration option <command>forward-2136</command> is set to 'no', as that will disable it globally.
               Using the domainmetadata setting than allows you to enable it per domain.
@@ -13329,7 +13329,7 @@ sql> insert into domainmetadata(domain_id, kind, content) values(5, ‘SOA-EDIT-
             <term>DEFAULT</term>
             <listitem>
               <para>
-                Generate a soa serial of YYYYMMDD01. If the current serial is lower than the generated serial, 
+                Generate a soa serial of YYYYMMDD01. If the current serial is lower than the generated serial,
                 use the generated serial. If the current serial is higher or equal to the generated serial, increase the
                 current serial by 1.
               </para>
@@ -13357,7 +13357,7 @@ sql> insert into domainmetadata(domain_id, kind, content) values(5, ‘SOA-EDIT-
             <term>SOA-EDIT-INCREASE</term>
             <listitem>
               <para>
-                Change the serial to whatever SOA-EDIT would provide. If what SOA-EDIT provides is lower than the current serial, 
+                Change the serial to whatever SOA-EDIT would provide. If what SOA-EDIT provides is lower than the current serial,
                 increase the current serial by 1.
               </para>
             </listitem>
@@ -13382,7 +13382,7 @@ dnssec-keygen -a hmac-md5 -b 128 -n USER dhcpdupdate
 -rw------- 1 root root  53 Aug 26 19:29 Kdhcpdupdate.+157+20493.key
 -rw------- 1 root root 165 Aug 26 19:29 Kdhcpdupdate.+157+20493.private
 
-# cat Kdhcpdupdate.+157+20493.key 
+# cat Kdhcpdupdate.+157+20493.key
 dhcpdupdate. IN KEY 0 3 157 FYhvwsW1ZtFZqWzsMpqhbg==
 </programlisting>
           The important bits are the name of the key (<command>dhcpdupdate</command>) and the hash of the key (<command>FYhvwsW1ZtFZqWzsMpqhbg==</command>
@@ -13419,7 +13419,7 @@ ddns-domainname "powerdnssec.org";
 ddns-rev-domainname "in-addr.arpa.";
 
 zone powerdnssec.org {
-       primary 127.0.0.1; 
+       primary 127.0.0.1;
        key dhcpdupdate;
 }
 
@@ -13441,7 +13441,7 @@ zone 1.168.192.in-addr.arpa. {
       <sect2 id="rfc2136-howto-powerdns"><title>Setting up PowerDNS</title>
         <para>A number of small changes are needed to powerdns to make it accept dynamic updates from <command>dhcpd</command>.</para>
         <para>
-         Enabled RFC2136 (dynamic update) support functionality in PowerDNS by adding the following to the 
+         Enabled RFC2136 (dynamic update) support functionality in PowerDNS by adding the following to the
          PowerDNS configuration file (pdns.conf).
 <programlisting>
 experimental-rfc2136=yes
@@ -13454,7 +13454,7 @@ allow-2136-from=
          </orderedlist>
         </para>
         <para>
-          We just told powerdns (via the configuration file) that we accept updates from nobody via the 
+          We just told powerdns (via the configuration file) that we accept updates from nobody via the
           <command>allow-2136-from</command> parameter. That's not very useful, so we're going to give permissions
           per zone, via the domainmetadata table.
 <programlisting>
@@ -13480,18 +13480,18 @@ sql> insert into domainmetadata (domain_id, kind, content) values (6, 'TSIG-ALLO
           <orderedlist>
             <listitem><para>Add the 'dhcpdupdate' key to our PowerDNSinstallation</para></listitem>
             <listitem><para>Associate the domains with the given TSIG key</para></listitem>
-          </orderedlist> 
+          </orderedlist>
         </para>
         <para>Restart PowerDNS and you should be ready to go!</para>
-      </sect2> 
+      </sect2>
     </sect1>
+
     <sect1 id="rfc2136-how-it-works"><title>How it works</title>
       <para>This is a short description of how RFC2136 (update) messages are processed by PowerDNS.</para>
       <para>
         <orderedlist>
           <listitem><para>
-            The RFC2136 message is received. If it is TSIG signed, the TSIG is validated against the tsigkeys table. 
+            The RFC2136 message is received. If it is TSIG signed, the TSIG is validated against the tsigkeys table.
             If it is not valid, Refused is returned to the requestor.
           </para></listitem>
           <listitem><para>A check is performed on the zone to see if it is a valid zone. ServFail is returned when not valid.</para></listitem>
@@ -13501,7 +13501,7 @@ sql> insert into domainmetadata (domain_id, kind, content) values (6, 'TSIG-ALLO
             If the requestor (sender of the update message) does not match the values in <command>ALLOW-2136-FROM</command>, Refused is returned.
           </para></listitem>
           <listitem><para>
-            If the message is TSIG signed, the TSIG keyname is compared with the TSIG keyname in domainmetadata. If they do not match, a Refused is send. 
+            If the message is TSIG signed, the TSIG keyname is compared with the TSIG keyname in domainmetadata. If they do not match, a Refused is send.
             The TSIG-ALLOW-2136 domainmetadata setting is used to find which key belongs to the domain.
           </para></listitem>
           <listitem><para>The backends are queried to find the backend for the given domain.</para></listitem>
@@ -13520,7 +13520,7 @@ sql> insert into domainmetadata (domain_id, kind, content) values (6, 'TSIG-ALLO
           </para></listitem>
           <listitem><para>
             Per record in the update message, a the prescan checks are performed. If the prescan fails, the corresponding RCode is returned.
-            If the prescan for the record is correct, the actual update/delete/modify of the record is performed. 
+            If the prescan for the record is correct, the actual update/delete/modify of the record is performed.
             If the update fails (for whatever reason), ServFail is returned.
             After changes to the records have been applied, the ordername and auth flag are set to make sure DNSSEC remains working.
             The cache for that record is purged.
@@ -22249,7 +22249,7 @@ static RandomLoader randomloader;
 
     <sect1 id="rfc2136-backend"><title>RFC2136 support</title>
       <para>
-        To make your backend RFC2136 compatible, it needs to implement a number of new functions and functions already used for slave-operation. 
+        To make your backend RFC2136 compatible, it needs to implement a number of new functions and functions already used for slave-operation.
         The new functions are not RFC2136 specific and might be used for other update/remove functionality at a later stage.
         <programlisting>
 class DNSBackend {
@@ -22266,7 +22266,7 @@ public:
         </programlisting>
       </para>
       <para>
-        
+
       </para>
       <para>
        <variablelist>
@@ -22274,7 +22274,7 @@ public:
            <term>virtual bool startTransaction(const string &amp;qname, int id);</term>
            <listitem>
              <para>
-               See <xref linkend="rw-backends" />. Please note that this function now receives a negative number (-1), which indicates that 
+               See <xref linkend="rw-backends" />. Please note that this function now receives a negative number (-1), which indicates that
                 the current zone data should NOT be deleted.
              </para>
            </listitem>
@@ -22301,7 +22301,7 @@ public:
         <term>virtual bool listSubZone(const string &amp;name, int domain_id);</term>
            <listitem>
              <para>
-            This method is needed for rectification of a zone after NS-records have been added. For DNSSEC, we need to know which records 
+            This method is needed for rectification of a zone after NS-records have been added. For DNSSEC, we need to know which records
             are below the currently added record.
             <function>listSubZone()</function> is used like <function>list()</function> which means PowerDNS will call <function>get()</function>
             after this method.
@@ -22310,7 +22310,7 @@ public:
 // First %s is 'sub.zone.com', second %s is '*.sub.zone.com'
 select content,ttl,prio,type,domain_id,name from records where (name='%s' OR name like '%s') and domain_id=%d
             </programlisting>
-            The method is not only used when adding records, but also to correct ENT-records in powerdns. Make sure it returns every record in the tree 
+            The method is not only used when adding records, but also to correct ENT-records in powerdns. Make sure it returns every record in the tree
             below the given record.
           </para>
            </listitem>
@@ -22319,9 +22319,9 @@ select content,ttl,prio,type,domain_id,name from records where (name='%s' OR nam
            <term>virtual bool replaceRRSet(uint32_t domain_id, const string&amp; qname, const QType&amp; qt, const vector&lt;DNSResourceRecord&gt;&amp; rrset);</term>
            <listitem>
              <para>
-               This method should remove all the records with <function>qname</function> of type <function>qt</function>. <function>qt</function> 
-               might also be ANY, which means all the records with that <function>qname</function> need to be removed.
-               After removal, the records in <function>rrset</function> must be added to the zone. <function>rrset</function> can be empty in which case the method is used to remove a RRset.
+               This method should remove all the records with <function>qname</function> of type <function>qt</function>. <function>qt</function>
+               might also be ANY, which means all the records with that <function>qname</function> need to be removed.
+               After removal, the records in <function>rrset</function> must be added to the zone. <function>rrset</function> can be empty in which case the method is used to remove a RRset.
           </para>
            </listitem>
          </varlistentry>
index d62b7294ef28c92be64c331e8179af99cffa3ac3..0acbf725dd60066ed16c5bdc106ba422da611cc9 100644 (file)
@@ -253,7 +253,6 @@ int PacketCache::purge(const string &match)
   *d_statnumentries=d_map.size();
   return delcount;
 }
-
 // called from ueberbackend
 bool PacketCache::getEntry(const string &qname, const QType& qtype, CacheEntryType cet, string& value, int zoneID, bool meritsRecursion, 
   unsigned int maxReplyLen, bool dnssecOk, bool hasEDNS)
index 04497dec6095fea3c091ec9654643d9c39924958..bef0381274d7f77900577a4afdc5f58038c11687 100644 (file)
@@ -1124,8 +1124,8 @@ DNSPacket *PacketHandler::questionOrRecurse(DNSPacket *p, bool *shouldRecurse)
         L<<Logger::Error<<"Received a TSIG signed message with a non-validating key"<<endl;
       // RFC3007 describes that a non-secure message should be sending Refused for DNS Updates
       if (p->d.opcode == Opcode::Update)
-        r->setRcode(RCode::Refused); 
-      else 
+        r->setRcode(RCode::Refused);
+      else
         r->setRcode(RCode::NotAuth);
       return r;
     }
index a3a44bb2048beb71dd5c84fbbfbeeb9b73e07dc2..b4068347de5b36c93094e3180a305c8a705152d3 100644 (file)
@@ -37,7 +37,7 @@ QType::QType()
 
 bool QType::isSupportedType() {
   for(vector<namenum>::iterator pos=names.begin();pos<names.end();++pos)
-    if(pos->second==code) 
+    if(pos->second==code)
       return true;
   return false;
 }
@@ -47,13 +47,12 @@ bool QType::isMetadataType() {
       code == QType::MAILA ||
       code == QType::MAILB ||
       code == QType::TSIG ||
-      code == QType::IXFR)  
+      code == QType::IXFR)
     return true;
 
   return false;
 }
 
-
 uint16_t QType::getCode() const
 {
   return code;
index d892bdfb8478a4611db13d28742d865b15c3d081..617a524795795aa5efca5bb1cfb518bf6a1e38a7 100644 (file)
@@ -76,11 +76,11 @@ public:
 
   static int chartocode(const char *p); //!< convert a character string to a code
 // more solaris fun
-#undef DS   
-  enum typeenum {A=1,NS=2, CNAME=5, SOA=6, MR=9, PTR=12, HINFO=13, MX=15, TXT=16, RP=17, AFSDB=18, SIG=24, KEY=25, AAAA=28, LOC=29, SRV=33, NAPTR=35, KX=36, 
+#undef DS
+  enum typeenum {A=1, NS=2, CNAME=5, SOA=6, MR=9, PTR=12, HINFO=13, MX=15, TXT=16, RP=17, AFSDB=18, SIG=24, KEY=25, AAAA=28, LOC=29, SRV=33, NAPTR=35, KX=36,
      CERT=37, A6=38, OPT=41, DS=43, SSHFP=44, IPSECKEY=45, RRSIG=46, NSEC=47, DNSKEY=48, DHCID=49, NSEC3=50, NSEC3PARAM=51,
      TLSA=52, SPF=99, EUI48=108, EUI64=109, TSIG=250, IXFR=251, AXFR=252, MAILB=253, MAILA=254, ANY=255, URL=256, MBOXFW=257, CURL=258, ADDR=259, DLV=32769} types;
-  typedef pair<string,uint16_t> namenum; 
+  typedef pair<string,uint16_t> namenum;
   static vector<namenum> names;
 
   inline bool operator==(const QType &comp) const {
@@ -117,17 +117,17 @@ private:
 
     init()
     {
-      qtype_insert("A",1);
-      qtype_insert("NS",2);
-      qtype_insert("CNAME",5);
-      qtype_insert("SOA",6);
-      qtype_insert("MR",9);
-      qtype_insert("PTR",12);
-      qtype_insert("HINFO",13);
-      qtype_insert("MINFO",14);
-      qtype_insert("MX",15);
-      qtype_insert("TXT",16);
-      qtype_insert("RP",17);
+      qtype_insert("A", 1);
+      qtype_insert("NS", 2);
+      qtype_insert("CNAME", 5);
+      qtype_insert("SOA", 6);
+      qtype_insert("MR", 9);
+      qtype_insert("PTR", 12);
+      qtype_insert("HINFO", 13);
+      qtype_insert("MINFO", 14);
+      qtype_insert("MX", 15);
+      qtype_insert("TXT", 16);
+      qtype_insert("RP", 17);
       qtype_insert("AFSDB", 18);
       qtype_insert("SIG", 24);
       qtype_insert("KEY", 25);
@@ -152,7 +152,7 @@ private:
       qtype_insert("SPF", 99);
       qtype_insert("EUI48", 108);
       qtype_insert("EUI64", 109);
-      qtype_insert("TSIG", 250);
+//      qtype_insert("TSIG", 250);
       qtype_insert("IXFR", 251);
       qtype_insert("AXFR", 252);
       qtype_insert("MAILB", 253);
index 13043c1ff8348b098b2f12ec917ba6c8764adee0..148a0f448d0face108283697e97b42c196f7b2e0 100644 (file)
@@ -155,9 +155,9 @@ static int parseResult(MOADNSParser& mdp, const std::string& origQname, uint16_t
       throw ResolverException(string("resolver: received an answer to another question (")+mdp.d_qname+"!="+ origQname+".)");
   }
     
-  vector<DNSResourceRecord> ret; 
+  vector<DNSResourceRecord> ret;
   DNSResourceRecord rr;
-  for(MOADNSParser::answers_t::const_iterator i=mdp.d_answers.begin(); i!=mdp.d_answers.end(); ++i) {          
+  for(MOADNSParser::answers_t::const_iterator i=mdp.d_answers.begin(); i!=mdp.d_answers.end(); ++i) {
     rr.qname = i->first.d_label;
     if(!rr.qname.empty())
       boost::erase_tail(rr.qname, 1); // strip .
@@ -165,7 +165,7 @@ static int parseResult(MOADNSParser& mdp, const std::string& origQname, uint16_t
     rr.ttl = i->first.d_ttl;
     rr.content = i->first.d_content->getZoneRepresentation();
     rr.priority = 0;
-    
+
     uint16_t qtype=rr.qtype.getCode();
 
     if(!rr.content.empty() && (qtype==QType::MX || qtype==QType::NS || qtype==QType::CNAME))
index 83371ec8a7f9eea8c6bde6d727906f67d09b88d9..f063d80f2be89816521ec4c23ca1c4ba859780cd 100644 (file)
@@ -38,13 +38,13 @@ int PacketHandler::checkUpdatePrerequisites(const DNSRecord *rr, DomainInfo *di)
       foundRecord=true;
   }
 
-  // Section 3.2.1        
-  if (rr->d_class == QClass::ANY && !foundRecord) { 
-    if (rr->d_type == QType::ANY) 
+  // Section 3.2.1
+  if (rr->d_class == QClass::ANY && !foundRecord) {
+    if (rr->d_type == QType::ANY)
       return RCode::NXDomain;
     if (rr->d_type != QType::ANY)
       return RCode::NXRRSet;
-  } 
+  }
 
   // Section 3.2.2
   if (rr->d_class == QClass::NONE && foundRecord) {
@@ -61,7 +61,7 @@ int PacketHandler::checkUpdatePrerequisites(const DNSRecord *rr, DomainInfo *di)
 // Method implements section 3.4.1 of RFC2136
 int PacketHandler::checkUpdatePrescan(const DNSRecord *rr) {
   // The RFC stats that d_class != ZCLASS, but we only support the IN class.
-  if (rr->d_class != QClass::IN && rr->d_class != QClass::NONE && rr->d_class != QClass::ANY) 
+  if (rr->d_class != QClass::IN && rr->d_class != QClass::NONE && rr->d_class != QClass::ANY)
     return RCode::FormErr;
 
   QType qtype = QType(rr->d_type);
@@ -74,7 +74,7 @@ int PacketHandler::checkUpdatePrescan(const DNSRecord *rr) {
 
   if (rr->d_class == QClass::ANY && rr->d_clen != 0)
     return RCode::FormErr;
-  
+
   if (qtype.isMetadataType())
       return RCode::FormErr;
 
@@ -94,7 +94,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
 
   if (rrType == QType::NSEC || rrType == QType::NSEC3) {
     L<<Logger::Warning<<msgPrefix<<"Trying to add/update/delete "<<rrLabel<<"|"<<rrType.getName()<<". These are generated records, ignoring!"<<endl;
-    return 0;    
+    return 0;
   }
 
   if (!isPresigned && ((!::arg().mustDo("experimental-direct-dnskey") && rrType == QType::DNSKEY) || rrType == QType::RRSIG)) {
@@ -175,7 +175,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
       rrset.push_back(rec);
       foundRecord = true;
     }
-    
+
     if (foundRecord) {
       if (rrType == QType::SOA) { // SOA updates require the serial to be higher than the current
         SOAData sdOld, sdUpdate;
@@ -224,7 +224,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
       bool auth = rrset.front().auth;
       if(*haveNSEC3) {
         string hashed;
-        if(! *narrow) 
+        if(! *narrow)
           hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr->d_iterations, ns3pr->d_salt, rrLabel)));
 
         if (*narrow)
@@ -268,7 +268,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
 
           if (pdns_iequals(di->zone, shorter))
             break;
-          
+
           bool foundShorter = false;
           di->backend->lookup(QType(QType::ANY), shorter);
           while (di->backend->get(rec)) {
@@ -290,9 +290,9 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
       if(*haveNSEC3)
       {
         string hashed;
-        if(! *narrow) 
+        if(! *narrow)
           hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr->d_iterations, ns3pr->d_salt, rrLabel)));
-        
+
         if (*narrow)
           di->backend->nullifyDNSSECOrderNameAndUpdateAuth(di->id, rrLabel, auth);
         else
@@ -303,7 +303,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
 
         if(!auth)
         {
-          if (ns3pr->d_flags) 
+          if (ns3pr->d_flags)
             di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "NS");
           di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "A");
           di->backend->nullifyDNSSECOrderNameAndAuth(di->id, rrLabel, "AAAA");
@@ -323,7 +323,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
 
 
       // If we insert an NS, all the records below it become non auth - so, we're inserting a delegate.
-      // Auth can only be false when the rrLabel is not the zone 
+      // Auth can only be false when the rrLabel is not the zone
       if (auth == false && rrType == QType::NS) {
         DLOG(L<<msgPrefix<<"Going to fix auth flags below "<<rrLabel<<endl);
         insnonterm.clear(); // No ENT's are needed below delegates (auth=0)
@@ -336,9 +336,9 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
         for(vector<string>::const_iterator qname=qnames.begin(); qname != qnames.end(); ++qname) {
           if(*haveNSEC3)  {
             string hashed;
-            if(! *narrow) 
+            if(! *narrow)
               hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr->d_iterations, ns3pr->d_salt, *qname)));
-        
+
             if (*narrow)
               di->backend->nullifyDNSSECOrderNameAndUpdateAuth(di->id, rrLabel, auth);
             else
@@ -357,14 +357,14 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
     }
   } // rr->d_class == QClass::IN
 
-  
+
   // Delete records - section 3.4.2.3 and 3.4.2.4 with the exception of the 'always leave 1 NS rule' as that's handled by
   // the code that calls this performUpdate().
   if ((rr->d_class == QClass::ANY || rr->d_class == QClass::NONE) && rrType != QType::SOA) { // never delete a SOA.
     DLOG(L<<msgPrefix<<"Deleting records: "<<rrLabel<<"; QClasse:"<<rr->d_class<<"; rrType: "<<rrType.getName()<<endl);
 
     if (rrType == QType::NSEC3PARAM) {
-      L<<Logger::Notice<<msgPrefix<<"Deleting NSEC3PARAM from zone, resetting ordernames."<<endl;  
+      L<<Logger::Notice<<msgPrefix<<"Deleting NSEC3PARAM from zone, resetting ordernames."<<endl;
       if (rr->d_class == QClass::ANY)
         d_dk.unsetNSEC3PARAM(rrLabel);
       else if (rr->d_class == QClass::NONE) {
@@ -373,7 +373,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
           d_dk.unsetNSEC3PARAM(rrLabel);
         else
           return 0;
-      } else 
+      } else
         return 0;
 
       // We retrieve new values, other RR's in this update package might need it as well.
@@ -468,9 +468,9 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
         for (vector<string>::const_iterator changeRec=updateAuthFlag.begin(); changeRec!=updateAuthFlag.end(); ++changeRec) {
           if(*haveNSEC3)  {
             string hashed;
-            if(! *narrow) 
+            if(! *narrow)
               hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr->d_iterations, ns3pr->d_salt, *changeRec)));
-        
+
             di->backend->updateDNSSECOrderAndAuthAbsolute(di->id, *changeRec, hashed, true);
           }
           else // NSEC
@@ -509,7 +509,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
           // if we delete b.c.d.e.test.com, we go up to d.e.test.com and then find b.d.e.test.com because that's below d.e.test.com.
           // At that point we can stop deleting ENT's because the tree is in tact again.
           di->backend->listSubZone(shorter, di->id);
-          
+
           while (di->backend->get(rec)) {
             if (rec.qtype.getCode())
               foundRealRR = true;
@@ -536,7 +536,7 @@ uint16_t PacketHandler::performUpdate(const string &msgPrefix, const DNSRecord *
       if(*haveNSEC3)
       {
         string hashed;
-        if(! *narrow) 
+        if(! *narrow)
           hashed=toLower(toBase32Hex(hashQNameWithSalt(ns3pr->d_iterations, ns3pr->d_salt, *i)));
         di->backend->updateDNSSECOrderAndAuthAbsolute(di->id, *i, hashed, true);
       }
@@ -587,7 +587,7 @@ int PacketHandler::forwardPacket(const string &msgPrefix, DNSPacket *p, DomainIn
     uint16_t len=htons(forwardPacket.getString().length());
     string buffer((const char*)&len, 2);
     buffer.append(forwardPacket.getString());
-    if(write(sock, buffer.c_str(), buffer.length()) < 0) { 
+    if(write(sock, buffer.c_str(), buffer.length()) < 0) {
       L<<Logger::Error<<msgPrefix<<"Unable to forward update message to "<<remote.toStringWithPort()<<", error:"<<stringerror()<<endl;
       continue;
     }
@@ -642,20 +642,20 @@ int PacketHandler::forwardPacket(const string &msgPrefix, DNSPacket *p, DomainIn
 int PacketHandler::processUpdate(DNSPacket *p) {
   if (! ::arg().mustDo("experimental-rfc2136"))
     return RCode::Refused;
-  
+
   string msgPrefix="UPDATE (" + itoa(p->d.id) + ") from " + p->getRemote() + " for " + p->qdomain + ": ";
   L<<Logger::Info<<msgPrefix<<"Processing started."<<endl;
 
   // Check permissions - IP based
   vector<string> allowedRanges;
   B.getDomainMetadata(p->qdomain, "ALLOW-2136-FROM", allowedRanges);
-  if (! ::arg()["allow-2136-from"].empty()) 
+  if (! ::arg()["allow-2136-from"].empty())
     stringtok(allowedRanges, ::arg()["allow-2136-from"], ", \t" );
 
   NetmaskGroup ng;
   for(vector<string>::const_iterator i=allowedRanges.begin(); i != allowedRanges.end(); i++)
     ng.addMask(*i);
-    
+
   if ( ! ng.match(&p->d_remote)) {
     L<<Logger::Error<<msgPrefix<<"Remote not listed in allow-2136-from or domainmetadata. Sending REFUSED"<<endl;
     return RCode::Refused;
@@ -667,7 +667,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
   B.getDomainMetadata(p->qdomain, "TSIG-ALLOW-2136", tsigKeys);
   if (tsigKeys.size() > 0) {
     bool validKey = false;
-    
+
     TSIGRecordContent trc;
     string inputkey, message;
     if (! p->getTSIGDetails(&trc,  &inputkey, &message)) {
@@ -690,13 +690,13 @@ int PacketHandler::processUpdate(DNSPacket *p) {
     L<<Logger::Warning<<msgPrefix<<"TSIG is provided, but domain is not secured with TSIG. Processing continues"<<endl;
 
   // RFC2136 uses the same DNS Header and Message as defined in RFC1035.
-  // This means we can use the MOADNSParser to parse the incoming packet. The result is that we have some different 
+  // This means we can use the MOADNSParser to parse the incoming packet. The result is that we have some different
   // variable names during the use of our MOADNSParser.
   MOADNSParser mdp(p->getString());
   if (mdp.d_header.qdcount != 1) {
     L<<Logger::Warning<<msgPrefix<<"Zone Count is not 1, sending FormErr"<<endl;
     return RCode::FormErr;
-  }     
+  }
 
   if (p->qtype.getCode() != QType::SOA) { // RFC2136 2.3 - ZTYPE must be SOA
     L<<Logger::Warning<<msgPrefix<<"Query ZTYPE is not SOA, sending FormErr"<<endl;
@@ -718,12 +718,12 @@ int PacketHandler::processUpdate(DNSPacket *p) {
   if (di.kind == DomainInfo::Slave)
     return forwardPacket(msgPrefix, p, &di);
 
-  // Check if all the records provided are within the zone 
+  // Check if all the records provided are within the zone
   for(MOADNSParser::answers_t::const_iterator i=mdp.d_answers.begin(); i != mdp.d_answers.end(); ++i) {
     const DNSRecord *rr = &i->first;
     // Skip this check for other field types (like the TSIG -  which is in the additional section)
     // For a TSIG, the label is the dnskey, so it does not pass the endOn validation.
-    if (! (rr->d_place == DNSRecord::Answer || rr->d_place == DNSRecord::Nameserver)) 
+    if (! (rr->d_place == DNSRecord::Answer || rr->d_place == DNSRecord::Nameserver))
       continue;
 
     string label = stripDot(rr->d_label);
@@ -742,7 +742,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
     return RCode::NotImp;
   }
 
-  // 3.2.1 and 3.2.2 - Prerequisite check 
+  // 3.2.1 and 3.2.2 - Prerequisite check
   for(MOADNSParser::answers_t::const_iterator i=mdp.d_answers.begin(); i != mdp.d_answers.end(); ++i) {
     const DNSRecord *rr = &i->first;
     if (rr->d_place == DNSRecord::Answer) {
@@ -752,7 +752,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
         di.backend->abortTransaction();
         return res;
       }
-    } 
+    }
   }
 
   // 3.2.3 - Prerequisite check - this is outside of updatePrequisitesCheck because we check an RRSet and not the RR.
@@ -764,7 +764,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
     const DNSRecord *rr = &i->first;
     if (rr->d_place == DNSRecord::Answer) {
       // Last line of 3.2.3
-      if (rr->d_class != QClass::IN && rr->d_class != QClass::NONE && rr->d_class != QClass::ANY) 
+      if (rr->d_class != QClass::IN && rr->d_class != QClass::NONE && rr->d_class != QClass::ANY)
         return RCode::FormErr;
 
       if (rr->d_class == QClass::IN) {
@@ -789,7 +789,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
           foundRR++;
           for(rrVector_t::iterator rrItem=vec->begin(); rrItem != vec->end(); ++rrItem) {
             rrItem->ttl = rec.ttl; // The compare one line below also compares TTL, so we make them equal because TTL is not user within prerequisite checks.
-            if (*rrItem == rec) 
+            if (*rrItem == rec)
               matchRR++;
           }
         }
@@ -822,7 +822,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
 
     bool updatedSerial=false;
     NSEC3PARAMRecordContent ns3pr;
-    bool narrow=false; 
+    bool narrow=false;
     bool haveNSEC3 = d_dk.getNSEC3PARAM(di.zone, &ns3pr, &narrow);
     bool isPresigned = d_dk.isPresigned(di.zone);
 
@@ -866,7 +866,7 @@ int PacketHandler::processUpdate(DNSPacket *p) {
       L<<Logger::Error<<msgPrefix<<"Failed to commit updates!"<<endl;
       return RCode::ServFail;
     }
-   
+
     S.deposit("rfc2136-changes", changedRecords);
 
     // Purge the records!
@@ -956,7 +956,7 @@ void PacketHandler::increaseSerial(const string &msgPrefix, const DomainInfo *di
     else
       soa2Update.serial = newser;
   }
-  
+
 
   newRec.content = serializeSOAData(soa2Update);
   vector<DNSResourceRecord> rrset;
index b90cab9aca3a46eb5a33f0fec7140a5c6a26fe60..e268961bd13164d3faa37de330fb7614ddeb61d3 100755 (executable)
@@ -18,7 +18,7 @@ answer
 cleandig host-1.test.dyndns ANY
 
 # check if the record exists, should result in an NXRRSET (section 3.2.1)
-# if the check fails, it will delete a record. 
+# if the check fails, it will delete a record.
 cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
@@ -63,7 +63,7 @@ cleandig host-2.test.dyndns A
 cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
-prereq yxdomain host.test.dyndns 
+prereq yxdomain host.test.dyndns
 send
 answer
 !
index 62edb5ff762e1cd7504c70b5937b846ed4930cf4..b10d1f2b7b2849ea8fc8b3506d035443bbcc896d 100644 (file)
@@ -1,2 +1,2 @@
 This test checks section 3.2.1 and 3.2.3 of RFC2136, which is the prerequisite section.
-This test also checks to see what happens when a backend does NOT support RFC2136. 
+This test also checks to see what happens when a backend does NOT support RFC2136.
index 1270e6437751facd041124747ca542582d8aa7ce..a8e53f4fbb0b3a07e374032686ddbaa65e9fca18 100644 (file)
@@ -1,2 +1,2 @@
 This test performs a simple add and delete of a A and TXT record. This is typically with ISC's DHCPD does.
-The interesting thing is the case-sensativity, as hosts can have capital letters in them (it's how you configure the dhcpd's client machine). 
+The interesting thing is the case-sensativity, as hosts can have capital letters in them (it's how you configure the dhcpd's client machine).
index 396672cff500d2a64932555350d345fc5fe67701..04f220805a1016e8d60edc8711ed8e3d6f72df88 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 #check if the cname exists
-cleandig cname3.test.dyndns CNAME hidesoadetails 
+cleandig cname3.test.dyndns CNAME hidesoadetails
 
 # add mx record
 cleannsupdate <<!
@@ -25,4 +25,4 @@ answer
 !
 
 # check if the record was deleted.
-cleandig cname3.test.dyndns CNAME hidesoadetails 
+cleandig cname3.test.dyndns CNAME hidesoadetails
index cece2f2139ca6f9b7c9f3bc1f9f818aea0815438..0e929fa03c0834a8591e6fe4ec623fa7011f20eb 100644 (file)
@@ -1,3 +1,3 @@
 A test to see if RFC2136 add and delete record works properly on an MX record,
-this is interesting because the priority is stored seperately in powerdns and 
+this is interesting because the priority is stored seperately in powerdns and
 it is part of the RDATA.
index 0e2058703f74adc2267740c0f2163392474cf289..f66e5a8af45a7355814f48dd383f48ee43b4bf75 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 
 # check if add-delete.test.dyndns exists. It should not.
-cleandig abc.add-delete.test.dyndns ANY hidesoadetails 
+cleandig abc.add-delete.test.dyndns ANY hidesoadetails
 
 # add a record
 cleannsupdate <<!
index e9b2276e3b8a99d320be4e73c47986f2ee4119a8..f03d2cb636c31f76eb2030ec9d4fcffed5894df8 100644 (file)
@@ -1,3 +1,3 @@
-This test tries to add a bogus record. It's an invalid record because not all the 
+This test tries to add a bogus record. It's an invalid record because not all the
 specifications have been met. (no type, etc). The test is using DNS::Update from perl
 because nsupdate does not allow you to send bogus records.
index cb0acd32130c9557adc5125daad1dd10bcaebad8..63aec2360da60dc1168591c6e56151df83126da2 100755 (executable)
@@ -10,9 +10,9 @@ $update->push(update => rr_add('host-invalid.test.dyndns.'));
 my $res = Net::DNS::Resolver->new;
 $res->nameservers($ARGV[0]);
 $res->port($ARGV[1]);
+
 my $reply = $res->send($update);
+
 if ($reply) {
        print "RCODE: ", $reply->header->rcode, "\n";
 } else {
index a68cf0e365ca577cfebe48de9d717bab584d8096..54ca3e7063897301473d55668af86053000dceeb 100755 (executable)
@@ -17,7 +17,7 @@ cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
 update add c.host.test.dyndns 3600 NS ns1.c.host.test.dyndns
-update add ns1.c.host.test.dyndns 3600 A 192.168.0.1 
+update add ns1.c.host.test.dyndns 3600 A 192.168.0.1
 send
 answer
 !
@@ -66,7 +66,7 @@ send
 answer
 !
 
-mysqldiff 3 "Check if we are back to normal" 
+mysqldiff 3 "Check if we are back to normal"
 
 cleandig a.host.test.dyndns ANY dnssec hidesoadetails
 cleandig b.host.test.dyndns ANY dnssec hidesoadetails
index eaa23c6a7fd2e16bdd356840cbffe63fc2eeff31..6414470b2762a3b3b97bbb9052a2c8ab1dec0c64 100755 (executable)
@@ -23,13 +23,13 @@ zone test.dyndns
 update add ns1.delegate2.test.dyndns 3600 A 127.0.0.1
 update add ns2.delegate2.test.dyndns 3600 A 127.0.0.1
 update add delegate2.test.dyndns 3600 NS ns1.delegate2.test.dyndns
-update add delegate2.test.dyndns 3600 NS ns2.example.com 
+update add delegate2.test.dyndns 3600 NS ns2.example.com
 send
 answer
 !
 
 cleandig delegate2.test.dyndns ANY
-mysqldiff 2 'Check delegate2 added correctly' 
+mysqldiff 2 'Check delegate2 added correctly'
 
 cleannsupdate <<!
 server $nameserver $port
@@ -52,7 +52,7 @@ cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
 update delete ns1.delegate2.test.dyndns A
-update delete ns2.delegate2.test.dyndns A 
+update delete ns2.delegate2.test.dyndns A
 update delete ns1.delegate1.test.dyndns A
 update delete ns2.delegate1.test.dyndns A
 send
index 7b20f0d6fce8ef7298dd3eb0d98e2bdfd4c34bc8..3fe6ff2f9a6257b210367f03a50b123ad64873d1 100755 (executable)
@@ -11,7 +11,7 @@ answer
 !
 
 #check if it exists
-cleandig test.dyndns MX 
+cleandig test.dyndns MX
 
 # remove a MX record, with the wrong priority, so this should not match.
 cleannsupdate <<!
index 32b6bc31e97f15585d80600d55f26ddb85625c42..9a99077bc51bbdc431eae3fef20dbd238f055b20 100755 (executable)
@@ -15,8 +15,8 @@ cleandig test.dyndns NS
 cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
-update delete test.dyndns. 3600 NS ns1.test.dyndns. 
-update delete test.dyndns. 3600 NS ns2.test.dyndns. 
+update delete test.dyndns. 3600 NS ns1.test.dyndns.
+update delete test.dyndns. 3600 NS ns2.test.dyndns.
 send
 answer
 !
@@ -36,10 +36,10 @@ cleandig test.dyndns NS
 cleannsupdate <<!
 server $nameserver $port
 zone test.dyndns
-update add test.dyndns. 3600 NS ns1.test.dyndns. 
+update add test.dyndns. 3600 NS ns1.test.dyndns.
 send
 answer
 !
 
-cleandig test.dyndns NS 
+cleandig test.dyndns NS
 
index 1d0482fcd19f2e3267e67073d3b7c23cf8db61b5..8bbacc0c9370d84fd3126d23ef97eaf5d8f75a87 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-       
+
 NSEC3=`cleandig test.dyndns NSEC3PARAM hidesoadetails dnssec`
 echo $NSEC3
 HAVENSEC3=`echo $NSEC3 | egrep 'IN[[:space:]]NSEC3PARAM' | wc -l`
index ccadd1ee1cef46971dffe18c0abda301253c15ba..ee43c0e8f7474bd1e2efe1d4c1726ba845a6dd75 100755 (executable)
@@ -1,12 +1,12 @@
 #!/bin/bash
-       
+
 NSEC3=`cleandig test.dyndns NSEC3PARAM hidesoadetails dnssec`
 echo $NSEC3
 HAVENSEC3=`echo $NSEC3 | egrep 'IN[[:space:]]NSEC3PARAM' | wc -l`
 
 cleandig b.host.test.dyndns A hidesoadetails dnssec
 
-mysqldiff 
+mysqldiff
 
 cleannsupdate <<!
 server $nameserver $port
index d760eead875cb689be85c53cf3f70be01b278cb6..7023736124cda0a9551605a9893c408057b6e7ec 100644 (file)
@@ -1,4 +1,4 @@
 We allow to add/remove the NSEC3PARAM record, this test confirms that everything is working correctly.
 The test operates a bit different when in NSEC mode, as we don't add a NSEC3PARAM at the end.
-In NSEC3-NARROW mode, we do add NSEC3PARAM's at the end, but these are then in non-narrow mode as we cannot 
+In NSEC3-NARROW mode, we do add NSEC3PARAM's at the end, but these are then in non-narrow mode as we cannot
 specify narrow mode in the NSEC3PARAM and the delete of the NSEC3PARAM also removed the narrow flag.
index 52bbeddd2097afb4656a525a98f4731e75e6df73..c0a3500886b779cab7ea759f66d82bde494f6b52 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-cleandig test.dyndns MX 
+cleandig test.dyndns MX
 
 cleannsupdate <<!
 server $nameserver $port
index bd4549c7608b41b1eef81782a7d13295341534fe..079a41f27299dfe2ad97602a811cf433c6afbd8c 100644 (file)
@@ -1,2 +1,2 @@
-A test for RFC2136 which checks section 3.4.2.2 - Replacing a record. 
+A test for RFC2136 which checks section 3.4.2.2 - Replacing a record.
 In this test, we specifically use MX record, to see if the TTL changes of the MX record with the correct priority.
\ No newline at end of file
index 37beb786c44a5c096979b19e1c8631697661bf3d..b6a9ab6cd56272c17aa1410ebf7dc5b42329baea 100644 (file)
@@ -1,4 +1,4 @@
 A test for RFC2136 which checks section 3.4.2.2 - Replacing a SOA record.
-This is special because we can 'set' the soa serial. 
+This is special because we can 'set' the soa serial.
 This test also does not use the hidesoaserial option because we want to compare that serial. It's also the reason why the test is run only once.
 
index 0f6eec7b9cdf931516481e3c280167e69225ff72..211cce2ca2db81dc51aee6a04d9a9a6d0547febd 100755 (executable)
@@ -56,7 +56,7 @@ do
        then
                echo $testname >> skipped_tests
                skipped=$[$skipped+1]
-       else    
+       else
                $a/command > $a/real_result
                expected=$a/expected_result
                for extracontext in $extracontexts
index 165cf810c192f6e9c2dc00ee10324f096e26cbdc..dbdba21e4314f15e4ca25825f61f1a1707a3fee2 100755 (executable)
@@ -717,18 +717,18 @@ rm pdns*.pid
 
 for zone in $(grep zone named.conf  | cut -f2 -d\")
 do
-       mv $zone.backup $zone
+       mv $zone.backup $zone
 done
 
 failed_tests=`wc -l failed_tests | cut -f 1 -d ' '`
 if [ $failed_tests = 0 ];
 then
-        exit 0;
+       exit 0;
 else
        for t in `cat failed_tests`
        do
                echo $t
                cat $t/diff
        done
-        exit 1;
+       exit 1;
 fi