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

ipallocator: Fix broken IPv6 conversion with leading zeros #4

Merged
merged 1 commit into from
Oct 26, 2021

Conversation

gandro
Copy link
Member

@gandro gandro commented Oct 25, 2021

This fixes a bug where GetIndexedIP would fail to produce correct IPv6 addresses if the IPv6 address contains leading zeros.

As a consequence, perfectly valid IPv6 pod CIDRs like fd:11::/64 could not be used.

This bug has been fixed in upstream for a while: kubernetes/utils#145

Ideally, we sync this package with upstream, as there are likely more such bugs that we have not fixed yet. But it seem upstream has moved quite far from our implementation and moved packages around, so it's unclear what changes we have applied on our side only.

This fixes a bug where GetIndexedIP would fail to produce correct IPv6
addresses if the IPv6 address contains leading zeros.

This bug has been fixed in upstream for a while:
kubernetes/utils#145

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
@gandro gandro requested review from aanm and tklauser October 25, 2021 18:35
@gandro gandro merged commit 54a7601 into master Oct 26, 2021
@gandro gandro deleted the pr/gandro/fix-ipv6 branch October 26, 2021 13:09
gandro added a commit to gandro/cilium that referenced this pull request Oct 26, 2021
This fixes a bug where IPv6 addresses with leading zeros (such as e.g.
`fd:11::/64`) were not supported by the IP allocator.

See also: cilium/ipam#4

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
kkourt pushed a commit to cilium/cilium that referenced this pull request Oct 27, 2021
This fixes a bug where IPv6 addresses with leading zeros (such as e.g.
`fd:11::/64`) were not supported by the IP allocator.

See also: cilium/ipam#4

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
michi-covalent pushed a commit to cilium/cilium that referenced this pull request Oct 27, 2021
This fixes a bug where IPv6 addresses with leading zeros (such as e.g.
`fd:11::/64`) were not supported by the IP allocator.

See also: cilium/ipam#4

Signed-off-by: Sebastian Wicki <sebastian@isovalent.com>
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.

None yet

2 participants