]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
4313. [bug] Handle ns_client_replace failures in test mode.
authorMark Andrews <marka@isc.org>
Wed, 3 Feb 2016 03:59:19 +0000 (14:59 +1100)
committerMark Andrews <marka@isc.org>
Wed, 3 Feb 2016 03:59:19 +0000 (14:59 +1100)
                        [RT #41190]

CHANGES
bin/named/query.c

diff --git a/CHANGES b/CHANGES
index 79aacf233d0e58141598b4a411d1e740b8f81490..5de23462027e7a5a5e73380309b17e1de0d6f9ff 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+4313.  [bug]           Handle ns_client_replace failures in test mode.
+                       [RT #41190]
+
 4312.  [bug]           dig's unknown dns and edns flags (MBZ value) logging
                        was not consistent. [RT #41600]
 
index 1ca95c9cfe819871e9e614b4f266eac5d632a8cf..66263bf60864b3d8aa4f9399bd5b57774c2881b0 100644 (file)
@@ -8902,8 +8902,16 @@ ns_query_start(ns_client_t *client) {
        /*
         * Test only.
         */
-       if (ns_g_clienttest && !TCP(client))
-               RUNTIME_CHECK(ns_client_replace(client) == ISC_R_SUCCESS);
+       if (ns_g_clienttest && !TCP(client)) {
+               result = ns_client_replace(client);
+               if (result == ISC_R_SHUTTINGDOWN) {
+                       ns_client_next(client, result);
+                       return;
+               } else if (result != ISC_R_SUCCESS) {
+                       query_error(client, result, __LINE__);
+                       return;
+               }
+       }
 
        /*
         * Ensure that appropriate cleanups occur.