]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Recursive quota should apply to tcp queries when the tcp quota is reached.
authorMark Andrews <marka@isc.org>
Thu, 11 Jul 2002 05:45:33 +0000 (05:45 +0000)
committerMark Andrews <marka@isc.org>
Thu, 11 Jul 2002 05:45:33 +0000 (05:45 +0000)
bin/named/query.c

index 6faa28058b3fb9956ac2d313043832fcc275d78d..73e2fd04166098847b2c602c93b96ee116051acc 100644 (file)
@@ -15,7 +15,7 @@
  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
-/* $Id: query.c,v 1.222 2002/07/09 02:41:36 marka Exp $ */
+/* $Id: query.c,v 1.223 2002/07/11 05:45:33 marka Exp $ */
 
 #include <config.h>
 
@@ -2198,7 +2198,7 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
         * because those have already been replaced when the
         * connection was accepted (if allowed by the TCP quota).
         */
-       if (! client->mortal && client->recursionquota == NULL) {
+       if (client->recursionquota == NULL) {
                isc_boolean_t killoldest = ISC_FALSE;
                result = isc_quota_attach(&ns_g_server->recursionquota,
                                          &client->recursionquota);
@@ -2213,7 +2213,7 @@ query_recurse(ns_client_t *client, dns_rdatatype_t qtype, dns_name_t *qdomain,
                if (dns_resolver_nrunning(client->view->resolver) >
                    (unsigned int)ns_g_server->recursionquota.max)
                        result = ISC_R_QUOTA;
-               if (result == ISC_R_SUCCESS &&
+               if (result == ISC_R_SUCCESS && !client->mortal &&
                    (client->attributes & NS_CLIENTATTR_TCP) == 0)
                        result = ns_client_replace(client);
                if (result != ISC_R_SUCCESS) {