1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Use hostIP to decide on Portmapper version

Use HostIP to decide which portmapper object to store the binding
in consistently in the allocate and release method (b506539e9c/drivers/bridge/port_mapping.go (L208))

Signed-off-by: Arko Dasgupta <arko.dasgupta@docker.com>
This commit is contained in:
Arko Dasgupta 2021-01-23 12:00:46 -08:00
parent b506539e9c
commit 5d3b0102f7

View file

@ -139,7 +139,7 @@ func (n *bridgeNetwork) allocatePort(bnd *types.PortBinding, ulPxyEnabled bool)
portmapper := n.portMapper
if bnd.IP.To4() == nil {
if bnd.HostIP.To4() == nil {
portmapper = n.portMapperV6
}