- ns3_add_link(host_src->node_num, host_dst->node_num, link_bdw, link_lat);
- if (symmetrical)
- ns3_add_link(host_dst->node_num, host_src->node_num, link_bdw, link_lat);
-
- xbt_free(link_bdw);
- xbt_free(link_lat);
+ ns3_add_link(host_src, host_dst, link->bandwidth(), link->latency());
+ } else {
+ static bool warned_about_long_routes = false;
+
+ if (not warned_about_long_routes)
+ XBT_WARN("Ignoring a route between %s and %s of length %zu: Only routes of length 1 are considered with NS3.\n"
+ "WARNING: You can ignore this warning if your hosts can still communicate when only considering routes "
+ "of length 1.\n"
+ "WARNING: Remove long routes to avoid this harmless message; subsequent long routes will be silently "
+ "ignored.",
+ src->cname(), dst->cname(), link_list->size());
+ warned_about_long_routes = true;