bind9/lib/ns
Ondřej Surý 78886d4bed 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.
2020-04-03 19:41:46 +02:00
..
include Remove some stale fields from ns_client_t; make sendbuf allocated on heap 2020-02-28 08:46:16 +01:00
tests Refactor the isc_log API so it cannot fail on memory failures 2020-03-18 09:05:59 +01:00
win32 apply the modified style 2020-02-13 15:05:06 -08:00
api Bump library API versions for BIND 9.17 2020-02-24 10:56:47 +01:00
client.c Fix the statistic counter underflow in ns_client_t 2020-04-03 19:41:46 +02:00
hooks.c apply the modified style 2020-02-13 15:05:06 -08:00
interfacemgr.c netmgr refactoring: use generic functions when operating on sockets. 2020-03-24 20:31:43 +00:00
Kyuafile regen master 2017-12-29 01:44:18 +00:00
lib.c apply the modified style 2020-02-13 15:05:06 -08:00
listenlist.c Reformat using the new rules 2020-02-14 09:31:05 +01:00
log.c apply the modified style 2020-02-13 15:05:06 -08:00
Makefile.in Add ZLIB_LIBS to ISCLIBS 2020-02-28 15:22:29 +01:00
notify.c apply the modified style 2020-02-13 15:05:06 -08:00
query.c Fix the statistic counter underflow in ns_client_t 2020-04-03 19:41:46 +02:00
server.c apply the modified style 2020-02-13 15:05:06 -08:00
sortlist.c apply the modified style 2020-02-13 15:05:06 -08:00
stats.c apply the modified style 2020-02-13 15:05:06 -08:00
update.c some Fossies-reported spelling errors were accidentally left unfixed 2020-02-21 14:12:42 -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 add serial number to "transfer ended" log messages 2020-03-05 17:20:16 -08:00