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

endpointmanager: unmap ip for lookup #29554

Merged
merged 1 commit into from Dec 4, 2023

Conversation

tklauser
Copy link
Member

@tklauser tklauser commented Dec 1, 2023

In case of an IPv4-mapped IPv6 address we'd lookup the address as an IPv4 address with a ::ffff: prefix, leading to endpoint lookup errors such as

cannot find endpoint with IP ::ffff:10.0.1.19

Fix this by explicitly unmapping the address before lookup which leads to 10.0.1.19 to be looked up (and found) in the above case.

Fixes: 54a896c ("endpointmanager: Use netip.Addr instead of net.IP in LookupIP")

In case of an IPv4-mapped IPv6 address we'd lookup the address as an
IPv4 address with a ::ffff: prefix, leading to endpoint lookup errors
such as

    cannot find endpoint with IP ::ffff:10.0.1.19

Fix this by explicitly unmapping the address before lookup which leads
to 10.0.1.19 to be looked up (and found) in the above case.

Fixes: 54a896c ("endpointmanager: Use netip.Addr instead of net.IP in LookupIP")

Signed-off-by: Tobias Klauser <tobias@cilium.io>
@tklauser tklauser added release-note/bug This PR fixes an issue in a previous release of Cilium. needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Dec 1, 2023
@tklauser tklauser requested a review from squeed December 1, 2023 14:28
@tklauser tklauser requested a review from a team as a code owner December 1, 2023 14:28
@maintainer-s-little-helper maintainer-s-little-helper bot added this to Needs backport from main in 1.14.5 Dec 1, 2023
@tklauser
Copy link
Member Author

tklauser commented Dec 1, 2023

/test

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label Dec 4, 2023
@squeed squeed added this pull request to the merge queue Dec 4, 2023
Merged via the queue into main with commit 7772523 Dec 4, 2023
204 checks passed
@squeed squeed deleted the pr/tklauser/endpointmgr-unmap-ip-before-lookup branch December 4, 2023 10:43
@nbusseneau nbusseneau mentioned this pull request Dec 5, 2023
10 tasks
@nbusseneau nbusseneau added backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. and removed needs-backport/1.14 This PR / issue needs backporting to the v1.14 branch labels Dec 5, 2023
@github-actions github-actions bot added backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. and removed backport-pending/1.14 The backport for Cilium 1.14.x for this PR is in progress. labels Dec 6, 2023
@nebril nebril moved this from Needs backport from main to Backport done to v1.14 in 1.14.5 Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-done/1.14 The backport for Cilium 1.14.x for this PR is done. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
No open projects
1.14.5
Backport done to v1.14
Development

Successfully merging this pull request may close these issues.

None yet

3 participants