diff --git a/bin/named/statschannel.c b/bin/named/statschannel.c index 8e89196fcf..0261ad4796 100644 --- a/bin/named/statschannel.c +++ b/bin/named/statschannel.c @@ -311,6 +311,8 @@ init_desc(void) { "QryUsedStale"); SET_NSSTATDESC(prefetch, "queries triggered prefetch", "Prefetch"); SET_NSSTATDESC(keytagopt, "Keytag option received", "KeyTagOpt"); + SET_NSSTATDESC(rootkeysentinel, "Root key sentinel queries", + "RootKeySentinel"); INSIST(i == ns_statscounter_max); /* Initialize resolver statistics */ diff --git a/lib/ns/include/ns/stats.h b/lib/ns/include/ns/stats.h index 4765cae299..0148a3fd3c 100644 --- a/lib/ns/include/ns/stats.h +++ b/lib/ns/include/ns/stats.h @@ -101,8 +101,9 @@ enum { ns_statscounter_prefetch = 63, ns_statscounter_keytagopt = 64, + ns_statscounter_rootkeysentinel = 65, - ns_statscounter_max = 65 + ns_statscounter_max = 66 }; void diff --git a/lib/ns/query.c b/lib/ns/query.c index 790840f6d1..8815ff3aba 100644 --- a/lib/ns/query.c +++ b/lib/ns/query.c @@ -5166,6 +5166,7 @@ root_key_sentinel_detect(query_ctx_t *qctx) { ns_client_log(qctx->client, NS_LOGCATEGORY_TAT, NS_LOGMODULE_QUERY, ISC_LOG_INFO, "root-key-sentinel-is-ta query label found"); + inc_stats(qctx->client, ns_statscounter_rootkeysentinel); } else if (qctx->client->query.qname->length > 31 && ndata[0] == 30 && strncasecmp(ndata + 1, "root-key-sentinel-not-ta-", 25) == 0) { @@ -5181,6 +5182,7 @@ root_key_sentinel_detect(query_ctx_t *qctx) { ns_client_log(qctx->client, NS_LOGCATEGORY_TAT, NS_LOGMODULE_QUERY, ISC_LOG_INFO, "root-key-sentinel-not-ta query label found"); + inc_stats(qctx->client, ns_statscounter_rootkeysentinel); } }