Skip to content
This repository was archived by the owner on Nov 23, 2017. It is now read-only.

Conversation

Martiusweb
Copy link
Member

In BaseSelectorEventLoop.sock_connect(), an address is resolved if needed, but
getaddrinfo() isn't called with the socket's parameters (family, proto, etc).
If the resolved address mismatch the socket type, the connection fails.

For instance, if getaddrinfo() returns an IPv6 (AF_INET6) resolution and the
socket is of family AF_INET, sock_connect() eventually raises a TypeError.

This PR is a follow-up to #357.

In BaseSelectorEventLoop.sock_connect(), an address is resolved if needed, but
getaddrinfo() isn't called with the socket's parameters (family, proto, etc).
If the resolved address mismatch the socket type, the connection fails.

For instance, if getaddrinfo() returns an IPv6 (AF_INET6) resolution and the
socket is an AF_INET, sock_connect() eventually raises a TypeError.
@ajdavis
Copy link

ajdavis commented Jun 27, 2016

LGTM, thanks.

@1st1
Copy link
Member

1st1 commented Jun 27, 2016

LGTM

@1st1 1st1 merged commit c288d5b into python:master Jun 28, 2016
@1st1
Copy link
Member

1st1 commented Jun 28, 2016

Thanks a lot!

@Martiusweb Martiusweb deleted the sock_connect_ipv6 branch June 28, 2016 15:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants