Skip to content

Regression in 20.10.6: Docker report a published port on ipv6 when ipv6 is disabled #42375

@thom-vend

Description

@thom-vend

Dear maintainer and community,

Steps to reproduce the issue

  • Disabled ipv6 on your ubuntu.20.04 box via
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
  • Disabled ipv6 on your docker daemon via "ipv6": false in /etc/docker/daemon.json
  • Restart docker service or even reboot the host.
  • Run a container like docker run -p 12345:80 --rm nginx:latest
  • docker ps report port 12345 published for both ipv6 and ipv4

Expected behavior

  • Docker should ONLY report an ipv4 published port.

How we catch this?
By investing a bug on AWS ECS:
On aws ecs we catch with docker-ce v20.10.6 The ipv4 and ipv6 being different after 14 days uptime on couple instances, all using 20.10.6

Another problem underneath: Different port number on ipv4 and ipv6
Here an extract on my ecs logs where you can find that the port on the ipv6 is not the same as ipv4

Ports="[{8080 50195 0.0.0.0 0} {8080 50191 :: 0}]"
Ports="[{8080 50195 0.0.0.0 0} {8080 50191 :: 0}]"
Ports="[{8080 50195 0.0.0.0 0} {8080 50191 :: 0}]"
Ports="[{8080 50195 0.0.0.0 0} {8080 50191 :: 0}]"
Ports="[{8080 50196 0.0.0.0 0} {8080 50192 :: 0}]"
Ports="[{8080 50196 0.0.0.0 0} {8080 50192 :: 0}]"
Ports="[{8080 50196 0.0.0.0 0} {8080 50192 :: 0}]"
Ports="[{8080 50196 0.0.0.0 0} {8080 50192 :: 0}]"
Ports="[{8080 50197 0.0.0.0 0} {8080 50193 :: 0}]"
Ports="[{8080 50197 0.0.0.0 0} {8080 50193 :: 0}]"
Ports="[{8080 50197 0.0.0.0 0} {8080 50193 :: 0}]"
Ports="[{8080 50197 0.0.0.0 0} {8080 50193 :: 0}]"
Ports="[{8080 50198 0.0.0.0 0} {8080 50194 :: 0}]"
Ports="[{8080 50198 0.0.0.0 0} {8080 50194 :: 0}]"

Solved by restarting dockerd: port on ipv4 and ipv6 are identical again

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions