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

nn_send assert when IPv4only option was disabled, and try to connect with IPv4 address #201

Closed
clearday4 opened this issue Nov 29, 2018 · 1 comment

Comments

@clearday4
Copy link

clearday4 commented Nov 29, 2018

I'm testing the PUSH/PULL socket using TCP transport.
If IPv4only option was disabled, and try to connect with IPv4 address,
the destination address resolved AF_INET, but local address which the socket would bind resolved as AF_INET6.
so nn_usock_start makes the socket AF_INET.
after that nn_ctcp_start_connecting() try to bind the local IPv6 address, it was failed.
the local address lookup code is not working properly.
nn_iface_any determines the bind address only with ipv4only option.

after that, nanomsg try to reconnect and takes a same routine again.
at that time usock->state is not idle, it is NN_USOCK_STATE_STARTING,
so nn_usock_start is assert.

please consider the following three points

  1. nn_iface_any should not determine the address with ipv4only option
  2. nn_usock_start should consider connection retry case.
  3. if ipv4only option is disabled, make the socket as AF_INET6 forced.
@clearday4 clearday4 changed the title nn_send assert whenIPv4only option was disabled, and try to connect with IPv4 address nn_send assert when IPv4only option was disabled, and try to connect with IPv4 address Nov 29, 2018
@clearday4
Copy link
Author

I move this issue to main branch

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

No branches or pull requests

1 participant