Fix DNSSEC work counting when swapping from UDP to TCP

This commit is contained in:
Simon Kelley committed 2024-10-04 17:20:33 +01:00
1 parent f5cdb007d8
commit e9a7cd0a50
4 files changed
+26 -4

No files matched your search

+3
View File
@@ -924,6 +924,9 @@ static void dnssec_validate(struct frec *forward, struct dns_header *header,
if (extract_name(header, plen, &p, daemon->namebuff, 0, 4) == 1)
log_query(F_UPSTREAM | F_NOEXTRA, daemon->namebuff, NULL, "truncated", (forward->flags & FREC_DNSKEY_QUERY) ? T_DNSKEY : T_DS);
/* Don't count failed UDP attempt AND TCP */
orig->work_counter++;
/* NOTE: Can't move connection marks from UDP to TCP */
status = swap_to_tcp(forward, now, (forward->flags & FREC_DNSKEY_QUERY) ? STAT_NEED_KEY_QUERY : STAT_NEED_DS_QUERY,
header, forward->stash_len, forward->class, forward->sentto, &orig->work_counter, &orig->validate_counter);