]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
3210. [bug] Canceling the oldest query due to recursive-client
authorEvan Hunt <each@isc.org>
Mon, 7 Nov 2011 23:03:09 +0000 (23:03 +0000)
committerEvan Hunt <each@isc.org>
Mon, 7 Nov 2011 23:03:09 +0000 (23:03 +0000)
overload could trigger an assertion failure. [RT #26463]

CHANGES
bin/named/client.c

diff --git a/CHANGES b/CHANGES
index 5327909be7bc467a027b0f919719918662b841e7..95e045582fffb0d9102fedf002939bab2a98b083 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,6 @@
+3210.  [bug]           Canceling the oldest query due to recursive-client
+                       overload could trigger an assertion failure. [RT #26463]
+
 3209.  [func]          Add "dnssec-lookaside 'no'".  [RT #24858]
 
 3208.  [bug]           'dig -y' handle unknown tsig alorithm better.
index 374fdbaaff06d75cf18ffa89bb2f9728baf4a642..d77e73bb5cbba0dfdf76850cfeb579b4b93d0f30 100644 (file)
@@ -15,7 +15,7 @@
  * PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: client.c,v 1.282 2011/11/03 21:14:22 each Exp $ */
+/* $Id: client.c,v 1.283 2011/11/07 23:03:09 each Exp $ */
 
 #include <config.h>
 
@@ -349,10 +349,16 @@ exit_check(ns_client_t *client) {
                 * I/O cancel is complete.  Burn down all state
                 * related to the current request.  Ensure that
                 * the client is no longer on the recursing list.
+                *
+                * We need to check whether the client is still linked,
+                * because it may already have been removed from the
+                * recursing list by ns_client_killoldestquery()
                 */
                if (client->state == NS_CLIENTSTATE_RECURSING) {
                        LOCK(&manager->reclock);
-                       ISC_LIST_UNLINK(manager->recursing, client, rlink);
+                       if (ISC_LINK_LINKED(client, rlink))
+                               ISC_LIST_UNLINK(manager->recursing,
+                                               client, rlink);
                        UNLOCK(&manager->reclock);
                }
                ns_client_endrequest(client);