Skip to content

cilium-cli: Force curl to use IPv4/IPv6 when asked #37468

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

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

gentoo-root
Copy link
Contributor

Currently, CurlCommand() relies on peer.Address(ipFam) to be of the requested address family. However, it's not always the case, for example, httpEndpoint.Address() ignores its parameter and just returns the domain name.

Make curl use the right address family in these cases by passing -4 or -6 accordingly.

Dependency of #37435 and #37461

Preparation to test IPv4 and IPv6 explicitly in connectivity tests

Currently, CurlCommand() relies on peer.Address(ipFam) to be of the
requested address family. However, it's not always the case, for
example, httpEndpoint.Address() ignores its parameter and just returns
the domain name.

Make curl use the right address family in these cases by passing -4 or
-6 accordingly.

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
@gentoo-root gentoo-root added the release-note/misc This PR makes changes that have no direct user impact. label Feb 6, 2025
@gentoo-root gentoo-root requested a review from a team as a code owner February 6, 2025 16:27
@gentoo-root gentoo-root requested a review from Artyop February 6, 2025 16:27
@github-actions github-actions bot added cilium-cli This PR contains changes related with cilium-cli cilium-cli-exclusive This PR only impacts cilium-cli binary labels Feb 6, 2025
@gentoo-root
Copy link
Contributor Author

/test

Currently the three repetitions are glued together in one line:

fd00:10:244:1::6d49:52080 -> 2606:4700:4700::1001:80 = 503fd00:10:244:1::6d49:52068 -> 2606:4700:4700::1001:80 = 503fd00:10:244:1::6d49:52092 -> 2606:4700:4700::1001:80 = 503

After the change, it looks like:

fd00:10:244:1::6d49:52080 -> 2606:4700:4700::1001:80 = 503
fd00:10:244:1::6d49:52068 -> 2606:4700:4700::1001:80 = 503
fd00:10:244:1::6d49:52092 -> 2606:4700:4700::1001:80 = 503

Signed-off-by: Maxim Mikityanskiy <maxim@isovalent.com>
@gentoo-root
Copy link
Contributor Author

/test

@gentoo-root gentoo-root added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Feb 10, 2025
@julianwiedmann julianwiedmann added this pull request to the merge queue Feb 10, 2025
Merged via the queue into main with commit 6851530 Feb 10, 2025
218 checks passed
@julianwiedmann julianwiedmann deleted the pr/max/ipv6-tests-prep branch February 10, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cilium-cli This PR contains changes related with cilium-cli cilium-cli-exclusive This PR only impacts cilium-cli binary ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/misc This PR makes changes that have no direct user impact.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants