[Dnsmasq-discuss] [PATCH 1/1] forward.c: fix handling of truncated response
rahul.thakur at iopsys.eu
rahul.thakur at iopsys.eu
Tue Sep 24 10:01:11 UTC 2024
From: Rahul Thakur <rahul.thakur at iopsys.eu>
the handling of truncated reponse is broken in 2.90. The answers
are removed before forwarding in case TC bit is set, which
seems incorrect.
test details-
the regression was caught by a CDrouter run and this change fixes
the regression.
---
src/forward.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/forward.c b/src/forward.c
index 10e7496..c893d84 100644
--- a/src/forward.c
+++ b/src/forward.c
@@ -782,13 +782,6 @@ static size_t process_reply(struct dns_header *header, time_t now, struct server
server->flags |= SERV_WARNED_RECURSIVE;
}
- if (header->hb3 & HB3_TC)
- {
- log_query(F_UPSTREAM, NULL, NULL, "truncated", 0);
- header->ancount = htons(0);
- header->nscount = htons(0);
- header->arcount = htons(0);
- }
if (!(header->hb3 & HB3_TC) && (!bogusanswer || (header->hb4 & HB4_CD)))
{
--
2.25.1
More information about the Dnsmasq-discuss
mailing list