mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Fix resolver responses statistics counter
The resquery_response() function increases the response counter without
checking if the response was successful. Increase the counter only when
the result indicates success.
(cherry picked from commit 12e7dfa397)
This commit is contained in:
parent
a492fb9963
commit
2a4bbf1d2e
1 changed files with 6 additions and 4 deletions
|
|
@ -7351,10 +7351,12 @@ resquery_response(isc_result_t eresult, isc_region_t *region, void *arg) {
|
|||
|
||||
QTRACE("response");
|
||||
|
||||
if (isc_sockaddr_pf(&query->addrinfo->sockaddr) == PF_INET) {
|
||||
inc_stats(fctx->res, dns_resstatscounter_responsev4);
|
||||
} else {
|
||||
inc_stats(fctx->res, dns_resstatscounter_responsev6);
|
||||
if (eresult == ISC_R_SUCCESS) {
|
||||
if (isc_sockaddr_pf(&query->addrinfo->sockaddr) == PF_INET) {
|
||||
inc_stats(fctx->res, dns_resstatscounter_responsev4);
|
||||
} else {
|
||||
inc_stats(fctx->res, dns_resstatscounter_responsev6);
|
||||
}
|
||||
}
|
||||
|
||||
rctx = isc_mem_get(fctx->mctx, sizeof(*rctx));
|
||||
|
|
|
|||
Loading…
Reference in a new issue