Skip to content

Why does MaraDNS return a packet with a RCODE of 0 ONLY when the QTYPE is AAAA(0x1C)? #118

Locked Answered by samboy
mingkwind asked this question in Q&A
Discussion options

You must be logged in to vote

To answer your question: Look at line 1681 in DwRecurse.c:

        if(in->len == 7 && qtype == RR_AAAA) { /* Blank packet */
                return dwx_synth_notthere(query);
        }

Why is this code here?

Because, back in 2011, if you sent an AAAA query to archive.org (and chase.com as I recall), it would respond with server fail. This server fail would gum things up when trying to resolve the domain name on a mixed IPv4 and IPv6 network, so I added the above code to make AAAA replies return not there instead in the specific case of an AAAA query when getting a bad reply upstream. This way, the downstream resolver would know the server didn’t have AAAA, and then try an A query.

This ha…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by samboy
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@mingkwind
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants