mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
2541. [bug] Conditionally update dispatch manager statistics.
[RT #19247]
This commit is contained in:
3
CHANGES
3
CHANGES
@@ -1,3 +1,6 @@
|
|||||||
|
2541. [bug] Conditionally update dispatch manager statistics.
|
||||||
|
[RT #19247]
|
||||||
|
|
||||||
2540. [func] Add a nibble mode to $GENERATE. [RT #18872]
|
2540. [func] Add a nibble mode to $GENERATE. [RT #18872]
|
||||||
|
|
||||||
2539. [security] Update the interaction between recursion, allow-query,
|
2539. [security] Update the interaction between recursion, allow-query,
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: dispatch.c,v 1.160 2009/01/27 22:29:59 jinmei Exp $ */
|
/* $Id: dispatch.c,v 1.161 2009/01/31 00:10:24 marka Exp $ */
|
||||||
|
|
||||||
/*! \file */
|
/*! \file */
|
||||||
|
|
||||||
@@ -354,6 +354,12 @@ mgr_log(dns_dispatchmgr_t *mgr, int level, const char *fmt, ...) {
|
|||||||
level, "dispatchmgr %p: %s", mgr, msgbuf);
|
level, "dispatchmgr %p: %s", mgr, msgbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
inc_stats(dns_dispatchmgr_t *mgr, dns_statscounter_t counter) {
|
||||||
|
if (mgr->stats != NULL)
|
||||||
|
isc_stats_increment(mgr->stats, counter);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
dispatch_log(dns_dispatch_t *disp, int level, const char *fmt, ...)
|
dispatch_log(dns_dispatch_t *disp, int level, const char *fmt, ...)
|
||||||
ISC_FORMAT_PRINTF(3, 4);
|
ISC_FORMAT_PRINTF(3, 4);
|
||||||
@@ -1263,8 +1269,7 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
|
|||||||
bucket, (resp == NULL ? "not found" : "found"));
|
bucket, (resp == NULL ? "not found" : "found"));
|
||||||
|
|
||||||
if (resp == NULL) {
|
if (resp == NULL) {
|
||||||
isc_stats_increment(mgr->stats,
|
inc_stats(mgr, dns_resstatscounter_mismatch);
|
||||||
dns_resstatscounter_mismatch);
|
|
||||||
free_buffer(disp, ev->region.base, ev->region.length);
|
free_buffer(disp, ev->region.base, ev->region.length);
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
@@ -1272,7 +1277,7 @@ udp_recv(isc_event_t *ev_in, dns_dispatch_t *disp, dispsocket_t *dispsock) {
|
|||||||
&resp->host)) {
|
&resp->host)) {
|
||||||
dispatch_log(disp, LVL(90),
|
dispatch_log(disp, LVL(90),
|
||||||
"response to an exclusive socket doesn't match");
|
"response to an exclusive socket doesn't match");
|
||||||
isc_stats_increment(mgr->stats, dns_resstatscounter_mismatch);
|
inc_stats(mgr, dns_resstatscounter_mismatch);
|
||||||
free_buffer(disp, ev->region.base, ev->region.length);
|
free_buffer(disp, ev->region.base, ev->region.length);
|
||||||
goto unlock;
|
goto unlock;
|
||||||
}
|
}
|
||||||
@@ -2986,8 +2991,8 @@ dns_dispatch_addresponse2(dns_dispatch_t *disp, isc_sockaddr_t *dest,
|
|||||||
oldestresp->item_out = ISC_TRUE;
|
oldestresp->item_out = ISC_TRUE;
|
||||||
isc_task_send(oldestresp->task,
|
isc_task_send(oldestresp->task,
|
||||||
ISC_EVENT_PTR(&rev));
|
ISC_EVENT_PTR(&rev));
|
||||||
isc_stats_increment(disp->mgr->stats,
|
inc_stats(disp->mgr,
|
||||||
dns_resstatscounter_dispabort);
|
dns_resstatscounter_dispabort);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3011,8 +3016,7 @@ dns_dispatch_addresponse2(dns_dispatch_t *disp, isc_sockaddr_t *dest,
|
|||||||
if (result != ISC_R_SUCCESS) {
|
if (result != ISC_R_SUCCESS) {
|
||||||
UNLOCK(&qid->lock);
|
UNLOCK(&qid->lock);
|
||||||
UNLOCK(&disp->lock);
|
UNLOCK(&disp->lock);
|
||||||
isc_stats_increment(disp->mgr->stats,
|
inc_stats(disp->mgr, dns_resstatscounter_dispsockfail);
|
||||||
dns_resstatscounter_dispsockfail);
|
|
||||||
return (result);
|
return (result);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user