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

Dan Stromberg drsalists at
Fri Apr 29 03:44:25 CEST 2011

On Thu, Apr 28, 2011 at 1:18 PM, cjblaine <cjblaine at> 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 is pointing to a CNAME rather than (one of)
the A record(s).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list