On 10 Dec 2010, at 13:04, Michael Carpenter wrote:

> Attempts to execute dns.resolver.query() using rdtype='ANY' will generate a 
> NoAnswer exception even for queries which return an answer. See test case 
> below.


It's not clear what dnspython ought to do in this case.  The model of 
dns.resolver.query() is that it gets an RRset of the specified type and returns 
it to you.  "ANY" is not a single type, so dnspython cannot return an ANY 
RRset, and the Answer object doesn't really work then.  Probably dnspython 
should just raise a ValueError or something if you try to do an ANY query.

Also, it doesn't really make sense to do an ANY query to a caching nameserver 
unless you're troubleshooting.  ANY *does not* force the receiving caching 
nameserver to do any new resolutions; it only causes the nameserver to return 
what it already knows.  If you're doing an ANY query to troubleshoot the 
server, that's OK, but if you're doing it for any other purpose, e.g. you're 
hoping to get A and AAAA, or MX and A, etc. your application is not going to 
work correctly.  The interface to dns.resolver.query() is definitely meant for 
finding answers rather than troubleshooting.  For troubleshooting, you should 
probably use dns.query.udp().

/Bob

_______________________________________________
dnspython-bugs mailing list
[email protected]
http://howl.play-bow.org/mailman/listinfo.cgi/dnspython-bugs

Reply via email to