]> git.ipfire.org Git - thirdparty/bind9.git/commit
Fix an ADB quota management error in the resolver
authorAram Sargsyan <aram@isc.org>
Thu, 22 Dec 2022 13:48:33 +0000 (13:48 +0000)
committerArаm Sаrgsyаn <aram@isc.org>
Fri, 23 Dec 2022 10:08:00 +0000 (10:08 +0000)
commit926f0323b6df457cdc68d2526dbb16a08bb78ada
treeebd17265f33cee487700901574e10424b768d8f2
parent650f3098e1e13dac5e726cb77051698b66ed734c
Fix an ADB quota management error in the resolver

Normally, when a 'resquery_t' object is created in fctx_query(),
we call dns_adb_beginudpfetch() (which increases the ADB quota)
only if it's a UDP query. Then, in fctx_cancelquery(), we call
dns_adb_endudpfetch() to decreases back the ADB quota, again only
if it's a UDP query.

The problem is that a UDP query can become a TCP query, preventing
the quota from adjusting back in fctx_cancelquery() later.

Call dns_adb_beginudpfetch() also when switching the query type
from UDP to TCP.

(cherry picked from commit 53afe1f978c7c46d961a00d2149f333bf6f0b687)
lib/dns/resolver.c