Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem: zmq_bind IPv4 fallback still tries IPv6 #1888

Merged
merged 3 commits into from
Apr 7, 2016

Conversation

bluca
Copy link
Member

@bluca bluca commented Apr 7, 2016

Solution: fix fallback in tcp_listener and add it in tcp_connecter. With these changes, if you try to bind/connect to an IPv4 endpoint when zmq_ipv6 is enabled but there's no support for IPv6, the connection works.

Fixes #1887

Solution: if opening an IPv6 TCP socket fails because IPv6 is not
available, try to open an IPv4 socket instead when creating and
binding a TCP endpoint.
Solution: if opening an IPv6 TCP socket fails because IPv6 is not
available, try to open an IPv4 socket instead when creating and
connecting a TCP endpoint.
Solution: in the Windows-specific ifdef in tcp_listener set_address,
check for error and set errno only after the IPv4 fallback has failed
too, to avoid setting errno when the socket creation succeeds through
the fallback.
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.01%) to 74.664% when pulling 9cf6f85 on bluca:ipv6_downgrade into 8251306 on zeromq:master.

@hintjens hintjens merged commit 23d08c2 into zeromq:master Apr 7, 2016
@bluca
Copy link
Member Author

bluca commented Apr 7, 2016

@hintjens - is it OK for you if I backport this to 4.0 and 4.1?

@bluca bluca deleted the ipv6_downgrade branch April 7, 2016 16:00
@hintjens
Copy link
Member

hintjens commented Apr 7, 2016

Great idea, yes.
On 7 Apr 2016 18:00, "Luca Boccassi" notifications@github.com wrote:

@hintjens https://github.com/hintjens - is it OK for you if I backport
this to 4.0 and 4.1?


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#1888 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Problem: zmq_bind IPv4 fallback still tries IPv6
3 participants