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

[release/1.7 backport] Fix ip_pref configuration option #11223

Merged

Conversation

thaJeztah
Copy link
Member

The ip.To16() function returns non-nil if `ip` is any kind
of IP address, including IPv4. To look for IPv6 specifically,
use ip.To4() == nil.

Signed-off-by: Sam Edwards <[email protected]>
(cherry picked from commit 88a8496)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sam Edwards <[email protected]>
(cherry picked from commit f77185f)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@dosubot dosubot bot added area/cri Container Runtime Interface (CRI) kind/bug labels Jan 6, 2025
Comment on lines 137 to +138
"ipv6 should be picked even if ipv4 comes first": {
ips: []string{"2001:db8:85a3::8a2e:370:7334", "192.168.17.43"},
ips: []string{"192.168.17.43", "2001:db8:85a3::8a2e:370:7334"},
Copy link
Member Author

Choose a reason for hiding this comment

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

Minor conflict in the tests in adjacent lines because main rewrote these to table-tests using a slice instead of a map.

@dmcgowan dmcgowan merged commit 1079d92 into containerd:release/1.7 Jan 7, 2025
58 checks passed
@thaJeztah thaJeztah deleted the 1.7_backport_fix-ipv6-pref branch January 7, 2025 07:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants