From: Mitchell E Berger Date: Fri, 18 May 2018 01:27:30 +0000 (-0400) Subject: Include TXT records in ANY queries X-Git-Tag: 0.0.19^0 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-dns.git/commitdiff_plain/ad8308debdb3e62190aa9074087ead1c80e2319f Include TXT records in ANY queries --- diff --git a/invirt-dns b/invirt-dns index 2b920bd..b540ff7 100755 --- a/invirt-dns +++ b/invirt-dns @@ -154,13 +154,13 @@ class DatabaseAuthority(common.ResolverBase): record = dns.Record_A(ip, ttl) results.append(dns.RRHeader(name, dns.A, dns.IN, ttl, record, auth=True)) - elif type == dns.SOA: - results.append(dns.RRHeader(domain, dns.SOA, dns.IN, - ttl, self.soa, auth=True)) - elif other and type == dns.TXT: + if other and type in (dns.TXT, dns.ALL_RECORDS): record = dns.Record_TXT(action if action else '', ttl=ttl) results.append(dns.RRHeader(name, dns.TXT, dns.IN, ttl, record, auth=True)) + if type == dns.SOA: + results.append(dns.RRHeader(domain, dns.SOA, dns.IN, + ttl, self.soa, auth=True)) if len(results) == 0: authority = []