internet: Fix global routing when using the multithreaded simulator

This commit is contained in:
F5
2022-10-25 17:08:48 +08:00
parent 91428b851c
commit 2076423b1e

View File

@@ -710,12 +710,14 @@ GlobalRouteManagerImpl::InitializeRoutes ()
Ptr<GlobalRouter> rtr = Ptr<GlobalRouter> rtr =
node->GetObject<GlobalRouter> (); node->GetObject<GlobalRouter> ();
#ifdef NS3_MPI
uint32_t systemId = Simulator::GetSystemId (); uint32_t systemId = Simulator::GetSystemId ();
// Ignore nodes that are not assigned to our systemId (distributed sim) // Ignore nodes that are not assigned to our systemId (distributed sim)
if (node->GetSystemId () != systemId) if (node->GetSystemId () != systemId)
{ {
continue; continue;
} }
#endif
// //
// if the node has a global router interface, then run the global routing // if the node has a global router interface, then run the global routing