bind9/lib/ns
Ondřej Surý cacaa94350 Fix the statistic counter underflow in ns_client_t
In case of normal fetch, the .recursionquota is attached and
ns_statscounter_recursclients is incremented when the fetch is created.  Then
the .recursionquota is detached and the counter decremented in the
fetch_callback().

In case of prefetch or rpzfetch, the quota is attached, but the counter is not
incremented.  When we reach the soft-quota, the function returns early but don't
detach from the quota, and it gets destroyed during the ns_client_endrequest(),
so no memory was leaked.

But because the ns_statscounter_recursclients is only incremented during the
normal fetch the counter would be incorrectly decremented on two occassions:

1) When we reached the softquota, because the quota was not properly detached
2) When the prefetch or rpzfetch was cancelled mid-flight and the callback
   function was never called.

(cherry picked from commit 78886d4bed)
2020-04-03 20:22:56 +02:00
..
include Remove some stale fields from ns_client_t; make sendbuf allocated on heap 2020-02-28 10:05:25 +01:00
tests Refactor the isc_log API so it cannot fail on memory failures 2020-03-18 11:44:18 +01:00
win32 Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
api prep 9.16.1 2020-03-20 11:47:01 +01:00
client.c Fix the statistic counter underflow in ns_client_t 2020-04-03 20:22:56 +02:00
hooks.c Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
interfacemgr.c netmgr refactoring: use generic functions when operating on sockets. 2020-04-03 13:44:28 +02:00
Kyuafile regen master 2017-12-29 01:44:18 +00:00
lib.c Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
listenlist.c Merge branch '46-enforce-clang-format-rules' into 'master' 2020-02-14 08:45:59 +00:00
log.c Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
Makefile.in Add ZLIB_LIBS to ISCLIBS 2020-02-28 15:22:59 +01:00
notify.c Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
query.c Fix the statistic counter underflow in ns_client_t 2020-04-03 20:22:56 +02:00
server.c Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
sortlist.c Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
stats.c Merge branch 'each-style-tweak' into 'master' 2020-02-14 05:35:29 +00:00
update.c some Fossies-reported spelling errors were accidentally left unfixed 2020-02-21 14:15:18 -08:00
version.c Use coccinelle to remove explicit '#include <config.h>' from the source files 2019-03-08 15:15:05 +01:00
xfrout.c Merge branch '46-enforce-clang-format-rules' into 'master' 2020-02-14 08:45:59 +00:00