Bug 646 - InternetStackHelper not compatible with multile Experiments
InternetStackHelper not compatible with multile Experiments
Status: RESOLVED DUPLICATE of bug 642
Product: ns-3
Classification: Unclassified
Component: helpers
ns-3-dev
All All
: P5 normal
Assigned To: ns-bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-27 00:29 UTC by Tom Henderson
Modified: 2009-07-28 01:47 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***