2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-09-04 16:45:24 +00:00

[master] fix memory growth problem

4733.	[bug]		Change #4706 introduced a bug causing TCP clients
			not be reused correctly, leading to unconstrained
			memory growth. [RT #46029]
This commit is contained in:
Evan Hunt
2017-09-20 12:12:02 -07:00
parent 924d93d4e7
commit 7a2112ff7d
3 changed files with 9 additions and 3 deletions

View File

@@ -1,3 +1,7 @@
4733. [bug] Change #4706 introduced a bug causing TCP clients
not be reused correctly, leading to unconstrained
memory growth. [RT #46029]
4732. [func] Change default minimal-responses setting to
no-auth-recursive. [RT #46016]

View File

@@ -529,7 +529,9 @@
<itemizedlist>
<listitem>
<para>
None.
The introduction of <command>libns</command> caused a bug
in which TCP client objects were not recycled after use,
leading to unconstrained memory growth. [RT #46029]
</para>
</listitem>
</itemizedlist>

View File

@@ -3487,7 +3487,7 @@ get_client(ns_clientmgr_t *manager, ns_interface_t *ifp,
* if that fails, make a new one.
*/
client = NULL;
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) != 0)
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) == 0)
ISC_QUEUE_POP(manager->inactive, ilink, client);
if (client != NULL)
@@ -3551,7 +3551,7 @@ get_worker(ns_clientmgr_t *manager, ns_interface_t *ifp, isc_socket_t *sock) {
* if that fails, make a new one.
*/
client = NULL;
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) != 0)
if ((manager->sctx->options & NS_SERVER_CLIENTTEST) == 0)
ISC_QUEUE_POP(manager->inactive, ilink, client);
if (client != NULL)