From 3e65e03554a89849af69eb88e83e879982a9e4d5 Mon Sep 17 00:00:00 2001 From: Teemu R Date: Mon, 6 Apr 2020 17:15:22 +0200 Subject: [PATCH] Allow TXT records on CHAOS qclass (#321) Some DNS servers intentionally "misuse" the obsoleted CHAOS (CH) qclass to provide things like `version.bind`, `version.server`, `authors.bind`, `hostname.bind` and `id.server`. C-ares was not allowing such use cases. Fix By: Teemu R. (@rytilahti) --- ares_parse_txt_reply.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ares_parse_txt_reply.c b/ares_parse_txt_reply.c index 4856b4ce..3f47e23f 100644 --- a/ares_parse_txt_reply.c +++ b/ares_parse_txt_reply.c @@ -113,7 +113,7 @@ ares__parse_txt_reply (const unsigned char *abuf, int alen, } /* Check if we are really looking at a TXT record */ - if (rr_class == C_IN && rr_type == T_TXT) + if ((rr_class == C_IN || rr_class == C_CHAOS) && rr_type == T_TXT) { /* * There may be multiple substrings in a single TXT record. Each