Authority records patch

Alexander Lourier aml at rulezz.ru
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: foo.bar.domain.com => com, 
domain.com, bar.domain.com, foo.bar.domain.com.

But if you ask COM authoritative servers about NS records for GOOGLE.COM you 
will get:
$ host -t ns com
com name server m.gtld-servers.net.
com name server d.gtld-servers.net.
com name server e.gtld-servers.net.
... [skip] ...
$ host -t ns google.com m.gtld-servers.net
google.com 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 m.gtld-servers.net about NS records for GOOGLE.COM will result 
in ns1.google.com, ns2.google.com, ns3.google.com, and ns4.google.com.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: authoritative-ns.patch
Type: text/x-diff
Size: 5253 bytes
Desc: not available
URL: <http://www.chiark.greenend.org.uk/pipermail/adns-discuss/attachments/20101107/c663eb8f/attachment-0001.patch>


More information about the adns-discuss mailing list