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

Handle ipv6 wrapped ipv4 addresses in loopback check #3013

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

adleong
Copy link
Member

@adleong adleong commented Jun 11, 2024

The IpAddr::is_loopback function does not account for ipv4 mapped ipv6 addresses and returns false if the address is an ipv4 localhost mapped to ipv6. This causes localhost-only admin endpoints to be unaccessible from localhost when ipv4 mapped ipv6 addresses are used.

We update the logic to check if the ipv6 address is ipv4 mapped and, if so, if the mapped ipv4 address is loopback.

Signed-off-by: Alex Leong <alex@buoyant.io>
@adleong adleong requested a review from a team as a code owner June 11, 2024 21:01
@olix0r olix0r merged commit 3458c94 into main Jun 14, 2024
15 checks passed
@olix0r olix0r deleted the alex/mapped-loopback branch June 14, 2024 04:44
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.

2 participants