diff --git a/bin/named/client.c b/bin/named/client.c index d826ab32bf..845326abc0 100644 --- a/bin/named/client.c +++ b/bin/named/client.c @@ -3464,8 +3464,9 @@ client_accept(ns_client_t *client) { * * So, we check here to see if any other clients are * already servicing TCP queries on this interface (whether - * accepting, reading, or processing). If we find at least - * one, then it's okay *not* to call accept - we can let this + * accepting, reading, or processing). If we find that at + * least one client other than this one is active, then + * it's okay *not* to call accept - we can let this * client go inactive and another will take over when it's * done. * @@ -3479,7 +3480,8 @@ client_accept(ns_client_t *client) { * quota is tcp-clients plus the number of listening * interfaces plus 1.) */ - exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > 0); + exit = (isc_atomic_xadd(&client->interface->ntcpactive, 0) > + (client->tcpactive ? 1 : 0)); if (exit) { client->newstate = NS_CLIENTSTATE_INACTIVE; (void)exit_check(client); diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml index 381768d540..9c76d3cd6f 100644 --- a/doc/arm/Bv9ARM-book.xml +++ b/doc/arm/Bv9ARM-book.xml @@ -8493,7 +8493,8 @@ avoid-v6-udp-ports { 40000; range 50000 60000; }; The number of file descriptors reserved for TCP, stdio, etc. This needs to be big enough to cover the number of - interfaces named listens on, tcp-clients as well as + interfaces named listens on plus + tcp-clients, as well as to provide room for outgoing TCP queries and incoming zone transfers. The default is 512. The minimum value is 128 and the