]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
pdnssec check-zone, improve SOA content check
authorKees Monshouwer <mind04@monshouwer.org>
Sun, 29 Sep 2013 16:58:52 +0000 (18:58 +0200)
committermind04 <mind04@monshouwer.org>
Fri, 22 Nov 2013 08:07:08 +0000 (09:07 +0100)
pdns/pdnssec.cc

index ddfc784c2cdf9b286389382d6a9fb5938544fc51..b557ed3505668017eb2808a12f1e2fd5546f5df4 100644 (file)
@@ -340,7 +340,6 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone)
   DNSResourceRecord rr;
   uint64_t numrecords=0, numerrors=0, numwarnings=0;
 
-
   bool hasNsAtApex = false;
   set<string> records, cnames, noncnames;
   map<string, unsigned int> ttl;
@@ -358,10 +357,16 @@ int checkZone(DNSSECKeeper &dk, UeberBackend &B, const std::string& zone)
       continue;
     }
 
-    if(rr.qtype.getCode() == QType::SOA)
-    {
-      fillSOAData(rr.content, sd);
-      rr.content = serializeSOAData(sd);
+    if(rr.qtype.getCode() == QType::SOA) {
+      vector<string>parts;
+      stringtok(parts, rr.content);
+
+      ostringstream o;
+      o<<rr.content;
+      for(int pleft=parts.size(); pleft < 7; ++pleft) {
+        o<<" 0";
+      }
+      rr.content=o.str();
     }
 
     content.str("");