Compare commits

...

1 Commits

Author SHA1 Message Date
Mark Andrews
bddc5f7834 Add statschannel counter for Root Key Sentinel feature 2018-04-18 09:28:44 -07:00
3 changed files with 6 additions and 1 deletions

View File

@@ -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 */

View File

@@ -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

View File

@@ -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);
}
}