[issue1958] IPv6 compiled getaddrinfo returns IPv6 address even if the system does not support IPv6

Douglas Mayle report at bugs.python.org
Mon Jan 28 22:51:16 CET 2008


New submission from Douglas Mayle:

The following code calls getadddrinfo and returns invalid addresses
(IPv6 addresses) when Python has been compiled with IPv6 support and the
system kernel does not support IPv6.

import socket
for res in socket.getaddrinfo("localhost", "80", 0, socket.SOCK_STREAM):
    print "%r" % (res,)

(2, 1, 6, '', ('127.0.0.1', 80))
(10, 1, 6, '', ('::1', 80, 0, 0))

----------
components: Library (Lib)
messages: 61799
nosy: douglas
severity: normal
status: open
title: IPv6 compiled getaddrinfo returns IPv6 address even if the system does not support IPv6
type: behavior
versions: Python 2.4

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1958>
__________________________________


More information about the Python-bugs-list mailing list