Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Adjust code after rebase.
[simgrid.git] / src / surf / network_ns3.cpp
index 7320bf5..80ebc3b 100644 (file)
@@ -333,7 +333,9 @@ LinkImpl* NetworkNS3Model::create_link(const std::string& name, const std::vecto
                                        s4u::Link::SharingPolicy policy)
 {
   xbt_assert(bandwidths.size() == 1, "ns-3 links must use only 1 bandwidth.");
-  return new LinkNS3(name, bandwidths[0], policy);
+  auto link = new LinkNS3(name, bandwidths[0], policy);
+  link->set_model(this);
+  return link;
 }
 
 Action* NetworkNS3Model::communicate(s4u::Host* src, s4u::Host* dst, double size, double rate)