Bug 646

Summary: InternetStackHelper not compatible with multile Experiments
Product: ns-3 Reporter: Tom Henderson <tomh>
Component: helpersAssignee: ns-bugs <ns-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P5    
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Tom Henderson 2009-07-27 00:29:09 UTC
To reproduce:  run wifi-clear-channel-cmu on ns-3-dev.

This constructor:
InternetStackHelper::InternetStackHelper ()
{
  SetTcp ("ns3::TcpL4Protocol");
  static Ipv4StaticRoutingHelper staticRouting;
  static Ipv4GlobalRoutingHelper globalRouting;
  static Ipv4ListRoutingHelper listRouting;
  listRouting.Add (staticRouting, 0);
  listRouting.Add (globalRouting, -10);
  SetRoutingHelper (listRouting);
}

is not compatible with programs that instantiate multiple InternetStackHelper objects.  Either some other way to manage the memory of these helper objects is needed, or some logic needs to be added to prevent the listRouting object from redundandly adding these other routing helpers.

The code probably should also assert (to catch programming errors) if two items are added at the same integer priority; presently it just pushes back to a std::list.
Comment 1 Tom Henderson 2009-07-28 01:47:42 UTC

*** This bug has been marked as a duplicate of bug 642 ***