Log truncated DNS replies.

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

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