Log SERVFAIL from usptream servers.

If we're doing DNSSEC validation and fail because the upstream
reply to our query is SERVFAIL, log this as the reason in
validation result line.

This will make maintainers lives easier when they get reports
of "wrong" validation failure, which is sometimes an upstream problem.
This commit is contained in:
Simon Kelley committed 2026-01-18 12:50:57 +00:00
1 parent 8fa68a6e1e
commit 8eb36844a0
5 files changed
+15 -3

No files matched your search

+5
View File
@@ -1399,6 +1399,9 @@ void return_reply(time_t now, struct frec *forward, struct dns_header *header, s
a.log.ede = ede;
log_query(F_SECSTAT, domain, &a, result, 0);
if (ede == EDE_US_SERVFAIL)
ede = EDE_DNSSEC_BOGUS;
}
}
@@ -2665,6 +2668,8 @@ unsigned char *tcp_request(int confd, time_t now,
a.log.ede = ede;
log_query(F_SECSTAT, domain, &a, result, 0);
if (ede == EDE_US_SERVFAIL)
ede = EDE_DNSSEC_BOGUS;
if ((daemon->limit[LIMIT_CRYPTO] - validatecount) > (int)daemon->metrics[METRIC_CRYPTO_HWM])
daemon->metrics[METRIC_CRYPTO_HWM] = daemon->limit[LIMIT_CRYPTO] - validatecount;