<div dir="ltr">Hi all, <div><br></div><div style>I saw in previous posts that DNSNameError signifies an &#39;NXDOMAIN&#39; status and DNSServerError signifies &#39;SERVFAIL&#39;. However, I am getting a DNSNameError from twisted.names.client.lookupAddress() when I query a hostname that has no A records, but *does have* other records (NS, SOA, etc). </div>
<div style><br></div><div style>An example:</div><div style><br></div><div style><div>; &lt;&lt;&gt;&gt; DiG 9.8.3-P1 &lt;&lt;&gt;&gt; <a href="http://megaupload.com">megaupload.com</a> ANY</div><div>;; -&gt;&gt;HEADER&lt;&lt;- opcode: QUERY, status: NOERROR, id: 19402<br>
</div><div>;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0, ADDITIONAL: 0</div><div><br></div><div>;; QUESTION SECTION:</div><div>;<a href="http://megaupload.com">megaupload.com</a>.<span class="" style="white-space:pre">                        </span>IN<span class="" style="white-space:pre">        </span>ANY</div>
<div><br></div><div>;; ANSWER SECTION:</div><div><a href="http://megaupload.com">megaupload.com</a>.<span class="" style="white-space:pre">                </span>21600<span class="" style="white-space:pre">        </span>IN<span class="" style="white-space:pre">        </span>SOA<span class="" style="white-space:pre">        </span><a href="http://ns5.cirfu.net">ns5.cirfu.net</a>. <a href="http://ipr.ic.fbi.gov">ipr.ic.fbi.gov</a>. 2013022001 3600 900 604800 900</div>
<div><a href="http://megaupload.com">megaupload.com</a>.<span class="" style="white-space:pre">                </span>21600<span class="" style="white-space:pre">        </span>IN<span class="" style="white-space:pre">        </span>NS<span class="" style="white-space:pre">        </span><a href="http://ns5.cirfu.net">ns5.cirfu.net</a>.</div>
<div><a href="http://megaupload.com">megaupload.com</a>.<span class="" style="white-space:pre">                </span>21600<span class="" style="white-space:pre">        </span>IN<span class="" style="white-space:pre">        </span>NS<span class="" style="white-space:pre">        </span><a href="http://ns6.cirfu.net">ns6.cirfu.net</a>.</div>
<div><br></div><div><br></div><div>dig is telling me &#39;status: NOERROR&#39;. Is there an easy way to determine the status of a DNS query from a twisted.names.dns.Message ? I checked the source and it wasn&#39;t readily apparent (to me). In my code I&#39;m checking the value of failure.value.__class__.__name__ to determine if an answer is NX or SERVFAIL. Seems like there should be a better way... Here&#39;s the code if anybody wants to take a look:</div>
<div><br></div><div><a href="http://paste.ubuntu.com/5669612/">http://paste.ubuntu.com/5669612/</a><br></div><div><br></div><div style>Thanks to the Twisted devs and maintainers for all your hard work!</div><div style><br>
</div><div style><br></div><div style>byrsa</div></div></div>