summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Kelley <simon@thekelleys.org.uk>2022-09-16 09:35:44 +0100
committerSimon Kelley <simon@thekelleys.org.uk>2022-09-16 09:35:44 +0100
commitf32498465dfb1f885c83b52576f5afa6f701e211 (patch)
tree2dd8eca4a5bdea8be1dcffd3a3f73fef4cfd7cc8
parentfa45e06431ff0e96d3840f2180666dfabbd2c972 (diff)
downloaddnsmasq-f32498465dfb1f885c83b52576f5afa6f701e211.tar.gz
Don't exclude stale-cache answers from "local answered" metric.
-rw-r--r--src/forward.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/forward.c b/src/forward.c
index 14d9421..45f0176 100644
--- a/src/forward.c
+++ b/src/forward.c
@@ -1820,7 +1820,9 @@ 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[stale ? METRIC_DNS_STALE_ANSWERED : METRIC_DNS_LOCAL_ANSWERED]++;
+ daemon->metrics[METRIC_DNS_LOCAL_ANSWERED]++;
+ if (stale)
+ daemon->metrics[METRIC_DNS_STALE_ANSWERED]++;
}
if (m == 0 || stale)