- if ((src->id() == dst->id()) && hasLoopback_) {
- xbt_assert(not src->isRouter(), "Routing from a cluster private router to itself is meaningless");
-
- std::pair<surf::LinkImpl*, surf::LinkImpl*> info = privateLinks_.at(nodePosition(src->id()));
- route->link_list.push_back(info.first);
- if (lat)
- *lat += info.first->latency();
+ if ((src->id() == dst->id()) && has_loopback_) {
+ if (src->is_router()) {
+ XBT_WARN("Routing from a cluster private router to itself is meaningless");
+ } else {
+ std::pair<resource::LinkImpl*, resource::LinkImpl*> info = private_links_.at(node_pos(src->id()));
+ route->link_list.push_back(info.first);
+ if (lat)
+ *lat += info.first->get_latency();
+ }