-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
cidrhost performing incorrect operations in IPv6 #15321
Comments
apparentlymart
added a commit
that referenced
this issue
Jun 16, 2017
This is to get an upstream fix which will in turn address #15321.
apparentlymart
added a commit
that referenced
this issue
Jun 16, 2017
This is to get an upstream fix which will in turn address #15321.
Looks like I forgot to close this! This was merged and included in 0.10.0-beta1. Thanks again, @mlosapio! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
ghost
locked and limited conversation to collaborators
Apr 8, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The library which
cidrhost
relies on is performing incorrect operations on IPv6 addresses.Example:
My IPv6 CIDR for the VPC:
So aws_vpc.ops-dev.ipv6_cidr_block =
2600:1f18:4704:1600::/56
The code in terraform:
in my subnet:
ipv6_cidr_block = "${cidrsubnet(aws_vpc.ops-dev.ipv6_cidr_block, 8, 0)}"
in my aws_instance:
ipv6_addresses = ["${cidrhost(aws_subnet.subnet-1.ipv6_cidr_block, 5)}"]
This is the computed value terraform attempts to instantiate - which obviously fails because its (way) outside the subnet CIDR.
ipv6_addresses.0: "2600:1f1d:4704:1600::"
This is completely wrong.
When applying the patch I submitted on the issue in the remote library:
apparentlymart/go-cidr#4
The correct IP address is specified:
ipv6_addresses.0: "2600:1f18:4704:1600::5"
This is a pretty high-profile issue as the function is presently completely incompatible with ipv6.
The text was updated successfully, but these errors were encountered: