diff --git a/tests-extra/tools/dnstest/response.py b/tests-extra/tools/dnstest/response.py index 714b56ef12ca98f6d65ab02f88f4849ca825a741..5dfad01b0169dae95a5a6233beef43dfc9509d0c 100644 --- a/tests-extra/tools/dnstest/response.py +++ b/tests-extra/tools/dnstest/response.py @@ -174,11 +174,12 @@ class Response(object): elif section == "authority": sect = self.resp.authority + cnt = 0 for rrset in sect: - if rrset.rdtype == rtype: - return len(rrset) - else: - return 0 + if rrset.rdtype == rtype or rtype == dns.rdatatype.ANY: + cnt += len(rrset) + + return cnt def check_nsec(self, nsec3=False, nonsec=False): '''Checks if the response contains NSEC(3) records.'''