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
}