Skip to content

fix port forwarding with ipv6.disable=1#42322

Closed
AkihiroSuda wants to merge 1 commit intomoby:masterfrom
AkihiroSuda:ipv6disable
Closed

fix port forwarding with ipv6.disable=1#42322
AkihiroSuda wants to merge 1 commit intomoby:masterfrom
AkihiroSuda:ipv6disable

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Apr 26, 2021

Marked as draft until moby/libnetwork#2635 gets merged

- What I did

Make docker run -p 80:80 functional again on environments with kernel boot parameter ipv6.disable=1.

Fix #42288
Fix docker/for-linux#1233

- How I did it

Skip listening on v6 addr when net.Listen("tcp6", "[::1]:p") fails

- How to verify it
Tested on Ubuntu 21.04 host.

  • Boot the host with kernel cmdline ipv6.disable=1.
  • Make sure docker run -p 80:80 nginx:alpine succeeds. Previously, this was failing with Error starting userland proxy: listen tcp6 [::]:80: socket: address family not supported by protocol.

- Description for the changelog

fix port forwarding with ipv6.disable=1

- A picture of a cute animal (not mandatory but encouraged)

🐧

Make `docker run -p 80:80` functional again on environments with kernel
boot parameter `ipv6.disable=1`.

Fix moby/moby issue 42288

Depends on moby/libnetwork PR 2635

Signed-off-by: Akihiro Suda <[email protected]>
@thaJeztah thaJeztah added this to the 21.xx milestone May 4, 2021
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request May 14, 2021
docker-engine 20.10.6 broke container port forwarding for hosts without IPv6
support:

docker: Error response from daemon: driver failed programming external
connectivity on endpoint naughty_moore
(038e9ed4b5ea77e1c52462d6d04ad001fbad9beb185a6511aadc217c8a271608): Error
starting userland proxy: listen tcp6 [::]:80: socket: address family not
supported by protocol.

Add a libnetwork patch from an upstream pull request to fix this, after
adjusting the patch to apply to docker-engine (which has libnetwork vendored
under vendor/github.com/docker/libnetwork):

- moby/libnetwork#2635,
- moby/moby#42322

Signed-off-by: Peter Korsgaard <[email protected]>
buildroot-auto-update pushed a commit to buildroot/buildroot that referenced this pull request May 17, 2021
docker-engine 20.10.6 broke container port forwarding for hosts without IPv6
support:

docker: Error response from daemon: driver failed programming external
connectivity on endpoint naughty_moore
(038e9ed4b5ea77e1c52462d6d04ad001fbad9beb185a6511aadc217c8a271608): Error
starting userland proxy: listen tcp6 [::]:80: socket: address family not
supported by protocol.

Add a libnetwork patch from an upstream pull request to fix this, after
adjusting the patch to apply to docker-engine (which has libnetwork vendored
under vendor/github.com/docker/libnetwork):

- moby/libnetwork#2635,
- moby/moby#42322

Signed-off-by: Peter Korsgaard <[email protected]>
(cherry picked from commit 2fd3390)
Signed-off-by: Peter Korsgaard <[email protected]>
@AkihiroSuda
Copy link
Member Author

Carried as #42412

ulbricht-inr pushed a commit to InnoRoute/buildroot that referenced this pull request Apr 23, 2022
docker-engine 20.10.6 broke container port forwarding for hosts without IPv6
support:

docker: Error response from daemon: driver failed programming external
connectivity on endpoint naughty_moore
(038e9ed4b5ea77e1c52462d6d04ad001fbad9beb185a6511aadc217c8a271608): Error
starting userland proxy: listen tcp6 [::]:80: socket: address family not
supported by protocol.

Add a libnetwork patch from an upstream pull request to fix this, after
adjusting the patch to apply to docker-engine (which has libnetwork vendored
under vendor/github.com/docker/libnetwork):

- moby/libnetwork#2635,
- moby/moby#42322

Signed-off-by: Peter Korsgaard <[email protected]>
(cherry picked from commit 2fd3390)
Signed-off-by: Peter Korsgaard <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants