mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 18:28:25 +00:00
Don't empty reply packets received from upstream marked as truncated.
It's concievable that upstream, has provided a useful minimal reply. After a patch from Rahul Thakur.
This commit is contained in:
@@ -737,14 +737,8 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (header->hb3 & HB3_TC)
|
if (header->hb3 & HB3_TC)
|
||||||
{
|
|
||||||
log_query(F_UPSTREAM, NULL, NULL, "truncated", 0);
|
log_query(F_UPSTREAM, NULL, NULL, "truncated", 0);
|
||||||
header->ancount = htons(0);
|
else if (!bogusanswer || (header->hb4 & HB4_CD))
|
||||||
header->nscount = htons(0);
|
|
||||||
header->arcount = htons(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!(header->hb3 & HB3_TC) && (!bogusanswer || (header->hb4 & HB4_CD)))
|
|
||||||
{
|
{
|
||||||
if (rcode == NXDOMAIN && extract_request(header, n, daemon->namebuff, NULL) &&
|
if (rcode == NXDOMAIN && extract_request(header, n, daemon->namebuff, NULL) &&
|
||||||
(check_for_local_domain(daemon->namebuff, now) || lookup_domain(daemon->namebuff, F_CONFIG, NULL, NULL)))
|
(check_for_local_domain(daemon->namebuff, now) || lookup_domain(daemon->namebuff, F_CONFIG, NULL, NULL)))
|
||||||
|
|||||||
Reference in New Issue
Block a user