From: Miod Vallat Date: Thu, 21 Aug 2025 11:56:51 +0000 (+0200) Subject: Put zone names (or what failed to parse as a zone) in error messages. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F16006%2Fhead;p=thirdparty%2Fpdns.git Put zone names (or what failed to parse as a zone) in error messages. Co-Authored-By: nlmark Signed-off-by: Miod Vallat --- diff --git a/pdns/dynhandler.cc b/pdns/dynhandler.cc index 074c574caa..212a59242e 100644 --- a/pdns/dynhandler.cc +++ b/pdns/dynhandler.cc @@ -251,7 +251,7 @@ string DLNotifyRetrieveHandler(const vector& 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& 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& 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"; } } diff --git a/regression-tests.nobackend/supermaster-signed/expected_result b/regression-tests.nobackend/supermaster-signed/expected_result index a238f29367..eb74ac8008 100644 --- a/regression-tests.nobackend/supermaster-signed/expected_result +++ b/regression-tests.nobackend/supermaster-signed/expected_result @@ -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' diff --git a/regression-tests.nobackend/supermaster-unsigned/expected_result b/regression-tests.nobackend/supermaster-unsigned/expected_result index 593213cb3c..40d931eb3f 100644 --- a/regression-tests.nobackend/supermaster-unsigned/expected_result +++ b/regression-tests.nobackend/supermaster-unsigned/expected_result @@ -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