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

Fix ProxyTunnel to always use the address instead of the hostname. #1563

Merged
merged 3 commits into from
May 14, 2021

Conversation

tkountis
Copy link
Contributor

@tkountis tkountis commented May 14, 2021

Motivation:

ProxyTunnel was returning the localhost hostname instead of the IP-address, which in some configurations
where the IPv4 is preferred but the DNS resolves in both IPv4 and IPv6 for the loopback hostname,
cause connectivity issues.

Modifications:

Modified the ProxyTunnel to always return the IP-address for the clients to connect to.

Result:

More stable test.

Motivation:

ProxyTunnel was returning the hostname instead of the address, which in some configurations
where the IPv4 is preferred but the DNS resolves in both IPv4 and IPv6 for the loopback hostname,
cause connectivity issues.

Modifications:

Modified the ProxyTunnel to always return the address for the clients to connect to.

Result:

More stable test.
@tkountis tkountis requested a review from idelpivnitskiy May 14, 2021 13:36
@tkountis tkountis self-assigned this May 14, 2021
Copy link
Member

@idelpivnitskiy idelpivnitskiy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!
For tests, we should always use IP, this is why we have AddressUtils. One suggestion:

…/ProxyTunnel.java

Co-authored-by: Idel Pivnitskiy <idel.pivnitskiy@apple.com>
@idelpivnitskiy idelpivnitskiy merged commit fecc3d3 into apple:main May 14, 2021
@idelpivnitskiy
Copy link
Member

Thank you!

hbelmiro pushed a commit to hbelmiro/servicetalk that referenced this pull request May 23, 2021
…apple#1563)

Motivation:

ProxyTunnel was returning the `localhost` hostname instead of the IP-address, which in some configurations
where the IPv4 is preferred but the DNS resolves in both IPv4 and IPv6 for the loopback hostname,
cause connectivity issues.

Modifications:

Modified the ProxyTunnel to always return the IP-address for the clients to connect to.

Result:

More stable test.
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.

3 participants