spiegel_podman/cmd/rootlessport
Paul Holzinger 7a6ad9db58
cmd/rootlessport: handle dual stack sockets right
With podman 6 we switch the main libpod port bind logic used as rootful
over to bind dual stack sockets correctly and no longer default the host
ip to 0.0.0.0.

So -p 8080:8080 should create one dual stack socket that binds all
addresses. While -p 0.0.0.0:8080:8080 -p [::]:8080:8080 should create
two sockets binding v4 and v6 respectively.

Because the go std lib always defaults to dual stack the second case
currently fails with EADDRINUSE which is wrong, so fix that to pass the
right protocol.

This is also how pasta works already so this makes everything consistent
now.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
(cherry picked from commit f6527ece2b)
Signed-off-by: Paul Holzinger <pholzing@redhat.com>
2026-09-01 15:36:49 +02:00
..
main.go cmd/rootlessport: handle dual stack sockets right 2026-09-01 15:36:49 +02:00
wsl.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00
wsl_test.go Switch common, storage and image to monorepo. 2025-09-01 12:33:04 +02:00