socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread cjblaine
Python 2.7.1 (perhaps others) I believe this is a bug. Comments? Docs state: Return a triple (hostname, aliaslist, ipaddrlist) where hostname is the primary host name responding to the given ip_address, aliaslist is a (possibly empty) list of alternative host names for the same address, and

Re: socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread Ned Deily
In article 850c85c0-be6e-4eec-b6b1-5c79e1716...@glegroupsg2000goo.googlegroups.com , cjblaine cjbla...@gmail.com wrote: Python 2.7.1 (perhaps others) I believe this is a bug. Comments? Docs state: Return a triple (hostname, aliaslist, ipaddrlist) where hostname is the primary host name

Re: socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread cjblaine
Thanks for the reply, Ned. Bummer for me. Check this out: C code on Solaris 10 SPARC returns the following with nscd running (the Solaris Naming Services Caching Daemon, on by default): PRIMARY according to gethostbyaddr(): my-dns-cname.our.org ALIAS according to gethostbyaddr():

Re: socket.gethostbyaddr() wrongly returning a DNS CNAME as the 'primary' hostname

2011-04-28 Thread Dan Stromberg
On Thu, Apr 28, 2011 at 1:18 PM, cjblaine cjbla...@gmail.com wrote: Thanks for the reply, Ned. Bummer for me. Check this out: C code on Solaris 10 SPARC returns the following with nscd running (the Solaris Naming Services Caching Daemon, on by default): I'm guessing the IP's PTR record