[issue8858] socket.getaddrinfo returns wrong results for IPv6 addresses

Marc Schlaich report at bugs.python.org
Tue Jan 22 08:59:36 CET 2013


Marc Schlaich added the comment:

I get the same result from `getaddrinfo` if Python is compiled with `--disable-ipv6`. Is this the correct behaviour? I would expect no IP v6 address at all.

Python 2.5.6 (r256:88840, Jan 22 2013, 08:41:04) 
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.has_ipv6
False
>>> socket.getaddrinfo(None, 9966, socket.AF_UNSPEC, socket.SOCK_STREAM, 0, socket.AI_PASSIVE)
[(2, 1, 6, '', ('0.0.0.0', 9966)), (10, 1, 6, '', (10, '&\xee\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'))]

----------
nosy: +schlamar

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8858>
_______________________________________


More information about the Python-bugs-list mailing list