Authority records patch

Alexander Lourier aml at
Sun Nov 7 07:56:25 GMT 2010

Hello everybody.

I wrote a code to validate DNS settings of the given domain. Local caching DNS 
servers may hold RRs for a long period of time, so I had to resolve names 
directly querying authoritative servers: => com,,,

But if you ask COM authoritative servers about NS records for GOOGLE.COM you 
will get:
$ host -t ns com
com name server
com name server
com name server
... [skip] ...
$ host -t ns has no NS record

In this case COM authoritative server actually sends NS records in the 
Authority Records section:

Domain Name System (response)
    Questions: 1
    Answer RRs: 0
    Authority RRs: 4
    Additional RRs: 4

I've made a patch to the libadns that does exactly following: if question type 
is NS and NSCOUNT=0 then return NS records from Authority RR section.

So requesting about NS records for GOOGLE.COM will result 
in,,, and
-------------- next part --------------
A non-text attachment was scrubbed...
Name: authoritative-ns.patch
Type: text/x-diff
Size: 5253 bytes
Desc: not available
URL: <>

More information about the adns-discuss mailing list