Log truncated DNS replies.

This commit is contained in:
Simon Kelley committed 2023-05-17 23:19:30 +01:00
1 parent 31c91b40bd
commit 1419de285f
3 files changed
+35 -17

No files matched your search

+4 -1
View File
@@ -980,7 +980,10 @@ int extract_addresses(struct dns_header *header, size_t qlen, char *name, time_t
}
}
}
if (header->hb3 & HB3_TC)
log_query(F_UPSTREAM, NULL, NULL, "truncated", 0);
/* Don't put stuff from a truncated packet into the cache.
Don't cache replies from non-recursive nameservers, since we may get a
reply containing a CNAME but not its target, even though the target