]> granicus.if.org Git - pdns/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>
Sun, 29 Sep 2013 16:58:52 +0000 (18:58 +0200)
pdns/pdnssec.cc

index e585a5b97a9f8ea05483543a4df04cb8dec9a432..90552ee51d1290e9150139b24872981e2f156147 100644 (file)
@@ -343,7 +343,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;
@@ -361,10 +360,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("");