Use getaddrinfo to obtain a correct sockaddr
While with AF_INET sockaddr is a 2-tuple composed by (address, port), with AF_INET6 it is a 4-tuple with (address, port, flow info, scope id). We were always passing a 2-tuple to socket.connect which would fail whenever the address was, for instance, a link-local IPv6 address that needs a scope id. With this change we now use getaddrinfo to correctly compute the full tuple. Fixes #156.
Showing
Please register or sign in to comment