- if (not src->isRouter()) { // No private link for the private router
- if (hasLimiter_) { // limiter for sender
- std::pair<surf::LinkImpl*, surf::LinkImpl*> info =
- privateLinks_.at(src->id() * linkCountPerNode_ + (hasLoopback_ ? 1 : 0));
- route->link_list->push_back(info.first);
+ if (not src->is_router()) { // No private link for the private router
+ if (has_limiter_) { // limiter for sender
+ std::pair<resource::LinkImpl*, resource::LinkImpl*> info = private_links_.at(node_pos_with_loopback(src->id()));
+ route->link_list.push_back(info.first);