]> granicus.if.org Git - pdns/commitdiff
emit single dot for root entry in zoneparser-tng
authorPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 30 Nov 2015 13:54:19 +0000 (14:54 +0100)
committerPeter van Dijk <peter.van.dijk@powerdns.com>
Mon, 30 Nov 2015 14:26:36 +0000 (15:26 +0100)
pdns/zoneparser-tng.cc

index 4867afe28c7cdd2e39f03ec95363acfe51ed341b..80f8bab20a135a1d2eff9aff3d0d89325b814b9f 100644 (file)
@@ -372,7 +372,7 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment)
   trim(rr.content);
 
   if(equals(rr.content, "@"))
-    rr.content=d_zonename.toStringNoDot();
+    rr.content=d_zonename.toStringRootDot();
 
   if(findAndElide(rr.content, '(')) {      // have found a ( and elided it
     if(!findAndElide(rr.content, ')')) {
@@ -395,7 +395,7 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment)
     stringtok(recparts, rr.content);
     if(recparts.size()==2) {
       if (recparts[1]!=".")
-        recparts[1] = toCanonic(d_zonename, recparts[1]).toStringNoDot();
+        recparts[1] = toCanonic(d_zonename, recparts[1]).toStringRootDot();
       rr.content=recparts[0]+" "+recparts[1];
     }
     break;
@@ -403,8 +403,8 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment)
   case QType::RP:
     stringtok(recparts, rr.content);
     if(recparts.size()==2) {
-      recparts[0] = toCanonic(d_zonename, recparts[0]).toStringNoDot();
-      recparts[1] = toCanonic(d_zonename, recparts[1]).toStringNoDot();
+      recparts[0] = toCanonic(d_zonename, recparts[0]).toStringRootDot();
+      recparts[1] = toCanonic(d_zonename, recparts[1]).toStringRootDot();
       rr.content=recparts[0]+" "+recparts[1];
     }
     break;
@@ -413,7 +413,7 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment)
     stringtok(recparts, rr.content);
     if(recparts.size()==4) {
       if(recparts[3]!=".")
-        recparts[3] = toCanonic(d_zonename, recparts[3]).toStringNoDot();
+        recparts[3] = toCanonic(d_zonename, recparts[3]).toStringRootDot();
       rr.content=recparts[0]+" "+recparts[1]+" "+recparts[2]+" "+recparts[3];
     }
     break;
@@ -424,14 +424,14 @@ bool ZoneParserTNG::get(DNSResourceRecord& rr, std::string* comment)
   case QType::DNAME:
   case QType::PTR:
   case QType::AFSDB:
-    rr.content=toCanonic(d_zonename, rr.content).toStringNoDot();
+    rr.content=toCanonic(d_zonename, rr.content).toStringRootDot();
     break;
 
   case QType::SOA:
     stringtok(recparts, rr.content);
     if(recparts.size() > 1) {
-      recparts[0]=toCanonic(d_zonename, recparts[0]).toStringNoDot();
-      recparts[1]=toCanonic(d_zonename, recparts[1]).toStringNoDot();
+      recparts[0]=toCanonic(d_zonename, recparts[0]).toStringRootDot();
+      recparts[1]=toCanonic(d_zonename, recparts[1]).toStringRootDot();
     }
     rr.content.clear();
     for(string::size_type n = 0; n < recparts.size(); ++n) {