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

Retry server connection using other address type #1562

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidBar-On
Copy link
Contributor

Suggested enhancement per discussion #1558 - when connection to the server fails on "connection refused" while using IPv4/IPv6 address type, retry with the other address type (IPv6/IPv4). This is done only when the server address is a hostname and -4 or -6 options are not used. The first address used is per the address returned by getaddrinfo() (called by netdial() -> create_socket()).

Note that per the getaddreinfo() man page: "AF_UNSPEC indicates that getaddrinfo() should return socket addresses for any address family (either IPv4 or IPv6, for example) that can be used with node and service". At least in my WSL machine only the IPv4 address is returned. This is why the retry in done in iperf_connect().

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.

1 participant