[New-bugs-announce] [issue18308] checkRecvmsgAddress wrong in test_socket.py (AIX failures)

David Edelsohn report at bugs.python.org
Wed Jun 26 17:37:10 CEST 2013

New submission from David Edelsohn:

The recvmsg tests in test_socket.py check that the address returned by recvmsg matches the original address to which the socket was bound. For IPv6, sockaddr includes sin6_scope_id, in addition to the address and port.

The test connects to host "::1", which is loopback, but is an under-specified address because the link scope is left ambiguous.

The scope_id in the original bind call defaults to "0", which represents an ambiguous scoped address and allows the IPV6 protocol and implementation to choose the interface or site identifier.  The recvmsg call returns the actual scope_id.

The test incorrectly checks that the full sockaddr matches. sin6_scope_id may not match for IPv6 addresses.  This generates bogus failures on AIX.

(Microsoft has a good description about scope_id:

components: Tests
messages: 191908
nosy: David.Edelsohn
priority: normal
severity: normal
status: open
title: checkRecvmsgAddress wrong in test_socket.py (AIX failures)
type: behavior
versions: Python 3.3, Python 3.4, Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list