Thanks to visit codestin.com
Credit goes to github.com

Skip to content

daemon/libnetwork/drivers/bridge: Check if endpoint data exists in po…#52121

Open
Wang-squirrel wants to merge 1 commit intomoby:masterfrom
Wang-squirrel:dev
Open

daemon/libnetwork/drivers/bridge: Check if endpoint data exists in po…#52121
Wang-squirrel wants to merge 1 commit intomoby:masterfrom
Wang-squirrel:dev

Conversation

@Wang-squirrel
Copy link

@Wang-squirrel Wang-squirrel commented Feb 28, 2026

In the populateEndpoints function, only the existence of the network corresponding to the bridge-endpoint is checked. We should also ensure that the endpoint data exists; otherwise, ports may be erroneously listened on due to residual bridge-endpoint data. This issue may occur in scenarios where container run or remove processes are abnormal.

otherwise like this:
[root@anolis~]# docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
[root@anolis~]# netstat -tunlp |grep 5000
tcp 0 0 0.0.0.0:5000 0.0.0.0:* LISTEN 3650/docker-proxy
tcp6 0 0 :::5000 :::* LISTEN 3657/docker-proxy

fixes #52092

- What I did
Prevent mislistening of container ports due to residual data in local-kv.db
- How I did it
Check for the existence of endpoint data associated with the bridge-endpoint before exposing the container port.
- How to verify it

@github-actions github-actions bot added the area/daemon Core Engine label Feb 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/daemon Core Engine

Projects

None yet

1 participant