Skip to content
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

Forcing a nil IP specified in PortBindings to IPv4zero (0.0.0.0). #2376

Merged
merged 1 commit into from
May 14, 2019

Conversation

pradipd
Copy link
Contributor

@pradipd pradipd commented May 13, 2019

We were using a different key for the port mapper.
During AllocatePorts, the portbindings hostIP was nil. So, the key to the port mapper was <HostIP:nil, host port, etc...>
However, during ReleasePorts, the portbindings hostIP was 0.0.0.0. So, the key to port mapper was <HostIP:0.0.0.0, host port, etc...>
Since thoe HostIP was different (nil vs 0.0.0.0), we never removed the entry from the port mapper. This resulted in us leaking all the port bindings in port mapper.

Signed-off-by: Pradip Dhara [email protected]

@thaJeztah
Copy link
Member

ping @ddebroy @mavenugo @arkodg PTAL

Copy link
Contributor

@mavenugo mavenugo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mavenugo mavenugo merged commit 5ac07ab into moby:master May 14, 2019
thaJeztah added a commit to thaJeztah/docker that referenced this pull request May 21, 2019
full diff: moby/libnetwork@9ff9b57...5ac07ab

brings in:

- moby/libnetwork#2376 Forcing a nil IP specified in PortBindings to IPv4zero (0.0.0.0)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
thaJeztah added a commit to thaJeztah/docker that referenced this pull request May 21, 2019
full diff: moby/libnetwork@9ff9b57...5ac07ab

brings in:

- moby/libnetwork#2376 Forcing a nil IP specified in PortBindings to IPv4zero (0.0.0.0)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit a66ddd8)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request May 23, 2019
full diff: moby/libnetwork@9ff9b57...5ac07ab

brings in:

- moby/libnetwork#2376 Forcing a nil IP specified in PortBindings to IPv4zero (0.0.0.0)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit a66ddd8ab88f63af646c01fc84d2ffcc2b0c240f)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Upstream-commit: 939aa52465212e5ade5eeed7dffa4cd48b17816d
Component: engine
docker-jenkins pushed a commit to docker-archive/docker-ce that referenced this pull request May 23, 2019
full diff: moby/libnetwork@9ff9b57...5ac07ab

brings in:

- moby/libnetwork#2376 Forcing a nil IP specified in PortBindings to IPv4zero (0.0.0.0)

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Upstream-commit: a66ddd8ab88f63af646c01fc84d2ffcc2b0c240f
Component: engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants