Commit 31f6244c authored by Evan Hunt's avatar Evan Hunt
Browse files

[master] tcp and udp stats counters

3739.	[func]		Added per-zone stats counters to track TCP and
			UDP queries. [RT #35375]
parent fb3ecd89
3739. [func] Added per-zone stats counters to track TCP and
UDP queries. [RT #35375]
3738. [bug] --enable-openssl-hash failed to build. [RT #35343]
3737. [bug] 'rndc retransfer' could trigger a assertion failure
......
......@@ -1728,7 +1728,7 @@ client_request(isc_task_t *task, isc_event_t *event) {
}
if (TCP_CLIENT(client))
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_tcp);
dns_nsstatscounter_requesttcp);
/*
* It's a request. Parse it.
......
......@@ -132,7 +132,7 @@ enum {
dns_nsstatscounter_tsigin = 4,
dns_nsstatscounter_sig0in = 5,
dns_nsstatscounter_invalidsig = 6,
dns_nsstatscounter_tcp = 7,
dns_nsstatscounter_requesttcp = 7,
dns_nsstatscounter_authrej = 8,
dns_nsstatscounter_recurserej = 9,
......@@ -176,7 +176,10 @@ enum {
dns_nsstatscounter_rpz_rewrites = 40,
dns_nsstatscounter_max = 41
dns_nsstatscounter_udp = 41,
dns_nsstatscounter_tcp = 42,
dns_nsstatscounter_max = 43
};
void
......
......@@ -6316,6 +6316,12 @@ query_find(ns_client_t *client, dns_fetchevent_t *event, dns_rdatatype_t qtype)
dns_db_attach(db, &client->query.authdb);
}
client->query.authdbset = ISC_TRUE;
/* Track TCP vs UDP stats per zone */
if ((client->attributes & NS_CLIENTATTR_TCP) != 0)
inc_stats(client, dns_nsstatscounter_tcp);
else
inc_stats(client, dns_nsstatscounter_udp);
}
db_find:
......
......@@ -170,7 +170,7 @@ init_desc(void) {
SET_NSSTATDESC(sig0in, "requests with SIG(0) received", "ReqSIG0");
SET_NSSTATDESC(invalidsig, "requests with invalid signature",
"ReqBadSIG");
SET_NSSTATDESC(tcp, "TCP requests received", "ReqTCP");
SET_NSSTATDESC(requesttcp, "TCP requests received", "ReqTCP");
SET_NSSTATDESC(authrej, "auth queries rejected", "AuthQryRej");
SET_NSSTATDESC(recurserej, "recursive queries rejected", "RecQryRej");
SET_NSSTATDESC(xfrrej, "transfer requests rejected", "XfrRej");
......@@ -218,6 +218,8 @@ init_desc(void) {
"RateSlipped");
SET_NSSTATDESC(rpz_rewrites, "response policy zone rewrites",
"RPZRewrites");
SET_NSSTATDESC(udp, "UDP queries received", "QryUDP");
SET_NSSTATDESC(tcp, "TCP queries received", "QryTCP");
INSIST(i == dns_nsstatscounter_max);
/* Initialize resolver statistics */
......
......@@ -1088,7 +1088,7 @@ zone_free(dns_zone_t *zone) {
isc_stats_detach(&zone->stats);
if (zone->requeststats != NULL)
isc_stats_detach(&zone->requeststats);
if(zone->rcvquerystats != NULL )
if (zone->rcvquerystats != NULL)
dns_stats_detach(&zone->rcvquerystats);
if (zone->db != NULL)
zone_detachdb(zone);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment