I encountered a problem that my calls to LinuxStackHelper::SysctlSet() were not taking effect, and then I traced it to the fact that my TCP sockets were created after a few milliseconds into the simulation, while the stack helper is deferring its set until 100ms in. Below is a workaround but something cleaner (to execute around time 0) should be devised.
diff --git a/helper/linux-stack-helper.cc b/helper/linux-stack-helper.cc
index 18c0919..0af2707 100644
--- a/helper/linux-stack-helper.cc
+++ b/helper/linux-stack-helper.cc
@@ -186,7 +186,7 @@ LinuxStackHelper::SysctlSet (NodeContainer c, std::string path, std::string valu
"You may need to do it via DceManagerHelper::Install ()");
}
// i.e., TaskManager::Current() needs it.
- Simulator::ScheduleWithContext (node->GetId (), Seconds (0.1),
+ Simulator::ScheduleWithContext (node->GetId (), MicroSeconds (1),
MakeEvent (&LinuxSocketFdFactory::Set, sock,
path, value));
}
Description of the problem
I encountered a problem that my calls to LinuxStackHelper::SysctlSet() were not taking effect, and then I traced it to the fact that my TCP sockets were created after a few milliseconds into the simulation, while the stack helper is deferring its set until 100ms in. Below is a workaround but something cleaner (to execute around time 0) should be devised.