]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Put zone names (or what failed to parse as a zone) in error messages. 16006/head
authorMiod Vallat <miod.vallat@powerdns.com>
Thu, 21 Aug 2025 11:56:51 +0000 (13:56 +0200)
committerMiod Vallat <miod.vallat@powerdns.com>
Thu, 21 Aug 2025 12:30:07 +0000 (14:30 +0200)
Co-Authored-By: nlmark <github@mscholten.eu>
Signed-off-by: Miod Vallat <miod.vallat@powerdns.com>
pdns/dynhandler.cc
regression-tests.nobackend/supermaster-signed/expected_result
regression-tests.nobackend/supermaster-unsigned/expected_result

index 074c574caa4cb0efb22a62451bd7f9bbf71a3132..212a59242e912ac88be34cbaf6750e901447d801 100644 (file)
@@ -251,7 +251,7 @@ string DLNotifyRetrieveHandler(const vector<string>& parts, Utility::pid_t /* pp
   try {
     domain = ZoneName(parts[1]);
   } catch (...) {
-    return "Failed to parse zone as valid DNS name";
+    return "Failed to parse '" + parts[1] + "' as a valid zone name";
   }
 
   ComboAddress primary_ip;
@@ -299,7 +299,7 @@ string DLNotifyHostHandler(const vector<string>& parts, Utility::pid_t /* ppid *
   try {
     domain = ZoneName(parts[1]);
   } catch (...) {
-    return "Failed to parse zone as valid DNS name";
+    return "Failed to parse '" + parts[1] + "' as a valid zone name";
   }
 
   try {
@@ -346,12 +346,12 @@ string DLNotifyHandler(const vector<string>& parts, Utility::pid_t /* ppid */)
     try {
       domain = ZoneName(parts[1]);
     } catch (...) {
-      return "Failed to parse zone as valid DNS name";
+      return "Failed to parse '" + parts[1] + "' as a valid zone name";
     }
     if(!Communicator.notifyDomain(domain, &B)) {
-      return "Failed to add to the queue - see log";
+      return "Failed to add " + domain.toLogString() + " to the queue - see log";
     }
-    return "Added to queue";
+    return "Added " + domain.toLogString() + " to queue";
   }
 }
 
index a238f29367dfa36b95751af5d9191fe69832ed5a..eb74ac80084f413ffcab8bf4bd9758eb3d220827 100644 (file)
@@ -3,6 +3,6 @@ Imported TSIG key tsig.com hmac-md5
 Set 'example.com' meta TSIG-ALLOW-AXFR = tsig.com
 Set 'test.com' meta TSIG-ALLOW-AXFR = tsig.com
 Set 'example.com' meta AXFR-MASTER-TSIG = tsig.com
-Added to queue
+Added test.com to queue
 Received notification response with error from 127.0.0.2:53: Query Refused
 For: 'test.com'
index 593213cb3c7418d8c004b738259a54fcefea53f3..40d931eb3fb335848e262cca67ac81277891e230 100644 (file)
@@ -1,3 +1,3 @@
 Set 'example.com' meta ALLOW-AXFR-FROM = 127.0.0.2
 Set 'test.com' meta ALLOW-AXFR-FROM = 127.0.0.2
-Added to queue
+Added test.com to queue