-
Notifications
You must be signed in to change notification settings - Fork 2.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
Add support for IPv6 port binding #5715
Comments
I think we'll need to make a separate copy of each port for v4 and v6 when we add ports. |
Oh, hmmmm. This isn't by default, but only when a v6 address is specified. Yeah, I think @rhatdan is right - this is too-aggressive parsing of the address to try and ensure it's an IPv4 |
Also - does that command you gave work in Docker? Because I'm 90% sure that specifying port numbers after an IPv6 address using an extra |
Yup, I was confused in the beginning too but it does not work with [ ] (brackets) and you need to do it like this. |
A friendly reminder that this issue had no activity for 30 days. |
to bump this and follow up, so specifying the ipv6 address not like the typical just as a note, that is counter to how every other utility that supports ipv6 works (the brackets are required to delimit where the address ends and where the port is to be specified.. |
I think we're going to have to retain support for the strange and nonstandard Docker parsing, but we can at least add support for standard IPv6 parsing at the same time. |
A friendly reminder that this issue had no activity for 30 days. |
@mheon Any movement on this? Issue for Interns? |
Just finished up on it now |
Fixed by #5715 |
Sorry, bu #6529 |
Two areas needed tweaking to accomplish this: port parsing and binding ports on the host. Parsing is an obvious problem - we have to accomodate an IPv6 address enclosed by [] as well as a normal IPv4 address. It was slightly complicated by the fact that we previously just counted the number of colons in the whole port definition (a thousand curses on whoever in the IPv6 standard body decided to reuse colons for address separators), but did not end up being that bad. Libpod also (optionally) binds ports on the host to prevent their reuse by host processes. This code was IPv4 only for TCP, and bound to both for UDP (which I'm fairly certain is not correct, and has been adjusted). This just needed protocols adjusted to read "tcp4"/"tcp6" and "udp4"/"udp6" based on what we wanted to bind to. Fixes containers#5715 Signed-off-by: Matthew Heon <[email protected]>
/kind feature
Description
Would be nice to be able to bind ports to IPv6 addresses like with IPv4. In Docker works both.
Describe the results you expected:
podman pod create --name=test --share net -p 2000:0000:60:1244::2:80:80/tcp
should work without an error likeError: unable to create pod: Invalid ip address 2000:0000:60:1244::2: address 2000:0000:60:1244::2:: too many colons in address
The text was updated successfully, but these errors were encountered: