]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
rec: make rec zone files with trailing dot
authorphonedph1 <20867105+phonedph1@users.noreply.github.com>
Wed, 1 Jun 2022 21:42:28 +0000 (15:42 -0600)
committerGitHub <noreply@github.com>
Wed, 1 Jun 2022 21:42:28 +0000 (15:42 -0600)
pdns/ws-recursor.cc

index 688718b6958bca3111a107adde6f0f34eb29c0d7..dd49293e41449fd162b23d6f0e17cbd1ecc137b4 100644 (file)
@@ -212,10 +212,10 @@ static void doCreateZone(const Json document)
       throw ApiException("Could not open '" + zonefilename + "' for writing: " + stringerror());
     }
     ofzone << "; Generated by pdns-recursor REST API, DO NOT EDIT" << endl;
-    ofzone << zonename << "\tIN\tSOA\tlocal.zone.\thostmaster." << zonename << " 1 1 1 1 1" << endl;
+    ofzone << zonename.toString() << "\tIN\tSOA\tlocal.zone.\thostmaster." << zonename.toString() << " 1 1 1 1 1" << endl;
     if (!singleIPTarget.empty()) {
-      ofzone << zonename << "\t3600\tIN\tA\t" << singleIPTarget << endl;
-      ofzone << "*." << zonename << "\t3600\tIN\tA\t" << singleIPTarget << endl;
+      ofzone << zonename.toString() << "\t3600\tIN\tA\t" << singleIPTarget << endl;
+      ofzone << "*." << zonename.toString() << "\t3600\tIN\tA\t" << singleIPTarget << endl;
     }
     ofzone.close();