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)
pull/322/head
Teemu R 5 years ago committed by GitHub
parent 649fe82c08
commit 3e65e03554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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

Loading…
Cancel
Save