Add stale cache replies to metrics.

This commit is contained in:
Simon Kelley committed 2022-09-12 14:50:17 +01:00
1 parent 0076481dfd
commit 1ba4ae2830
4 files changed
+5 -1

No files matched your search

+1 -1
View File
@@ -1799,7 +1799,7 @@ void receive_query(struct listener *listen, time_t now)
#endif
send_from(listen->fd, option_bool(OPT_NOWILD) || option_bool(OPT_CLEVERBIND),
(char *)header, m, &source_addr, &dst_addr, if_index);
daemon->metrics[METRIC_DNS_LOCAL_ANSWERED]++;
daemon->metrics[stale ? METRIC_DNS_STALE_ANSWERED : METRIC_DNS_LOCAL_ANSWERED]++;
}
if (m == 0 || stale)