diff --git a/libnetwork/drivers/bridge/port_mapping.go b/libnetwork/drivers/bridge/port_mapping.go index c68d3dcbb9..946130ecdd 100644 --- a/libnetwork/drivers/bridge/port_mapping.go +++ b/libnetwork/drivers/bridge/port_mapping.go @@ -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 }