Commit 02a5e3ed authored by Mark Andrews's avatar Mark Andrews
Browse files

3755. [func] Add stats counters for known EDNS options + others.

                        [RT #35447]
parent c48c691c
3755. [func] Add stats counters for known EDNS options + others.
[RT #35447]
--- 9.10.0b1 released ---
3754. [cleanup] win32: Installer now places files in the
......
......@@ -1776,6 +1776,8 @@ process_opt(ns_client_t *client, dns_rdataset_t *opt) {
optlen = isc_buffer_getuint16(&optbuf);
switch (optcode) {
case DNS_OPT_NSID:
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_nsidopt);
client->attributes |= NS_CLIENTATTR_WANTNSID;
isc_buffer_forward(&optbuf, optlen);
break;
......@@ -1785,10 +1787,14 @@ process_opt(ns_client_t *client, dns_rdataset_t *opt) {
break;
#endif
case DNS_OPT_EXPIRE:
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_expireopt);
client->attributes |= NS_CLIENTATTR_WANTEXPIRE;
isc_buffer_forward(&optbuf, optlen);
break;
default:
isc_stats_increment(ns_g_server->nsstats,
dns_nsstatscounter_otheropt);
isc_buffer_forward(&optbuf, optlen);
break;
}
......
......@@ -180,17 +180,21 @@ enum {
dns_nsstatscounter_udp = 41,
dns_nsstatscounter_tcp = 42,
dns_nsstatscounter_nsidopt = 43,
dns_nsstatscounter_expireopt = 44,
dns_nsstatscounter_otheropt = 45,
#ifdef ISC_PLATFORM_USESIT
dns_nsstatscounter_sitopt = 43,
dns_nsstatscounter_sitbadsize = 44,
dns_nsstatscounter_sitbadtime = 45,
dns_nsstatscounter_sitnomatch = 46,
dns_nsstatscounter_sitmatch = 47,
dns_nsstatscounter_sitnew = 48,
dns_nsstatscounter_max = 49
dns_nsstatscounter_sitopt = 46,
dns_nsstatscounter_sitbadsize = 47,
dns_nsstatscounter_sitbadtime = 48,
dns_nsstatscounter_sitnomatch = 49,
dns_nsstatscounter_sitmatch = 50,
dns_nsstatscounter_sitnew = 51,
dns_nsstatscounter_max = 52
#else
dns_nsstatscounter_max = 43
dns_nsstatscounter_max = 46
#endif
};
......
......@@ -220,6 +220,9 @@ init_desc(void) {
"RPZRewrites");
SET_NSSTATDESC(udp, "UDP queries received", "QryUDP");
SET_NSSTATDESC(tcp, "TCP queries received", "QryTCP");
SET_NSSTATDESC(nsidopt, "NSID option received", "NSIDOpt");
SET_NSSTATDESC(expireopt, "Expire option recieved", "ExpireOpt");
SET_NSSTATDESC(otheropt, "Other EDNS option recieved", "OtherOpt");
#ifdef ISC_PLATFORM_USESIT
SET_NSSTATDESC(sitopt, "source identity token option received",
"SitOpt");
......
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