diff --git a/src/internet/helper/ipv4-address-helper.cc b/src/internet/helper/ipv4-address-helper.cc index 5f748569b..12226226e 100644 --- a/src/internet/helper/ipv4-address-helper.cc +++ b/src/internet/helper/ipv4-address-helper.cc @@ -161,15 +161,13 @@ Ipv4AddressHelper::Assign (const NetDeviceContainer &c) ipv4->SetUp (interface); retval.Add (ipv4, interface); + // Install the default traffic control configuration if the traffic + // control layer has been aggregated, if this is not + // a loopback interface, and there is no queue disc installed already Ptr tc = node->GetObject (); - - NS_ASSERT_MSG (tc, "Ipv4AddressHelper::Assign(): NetDevice is associated" - "with a node without the Traffic Control layer installed"); - - // Install the default traffic control configuration, if this is not a loopback - // interface and there is no queue disc installed already - if (DynamicCast (device) == 0 && tc->GetRootQueueDiscOnDevice (device) == 0) + if (tc && DynamicCast (device) == 0 && tc->GetRootQueueDiscOnDevice (device) == 0) { + NS_LOG_LOGIC ("Installing default traffic control configuration"); TrafficControlHelper tcHelper = TrafficControlHelper::Default (); tcHelper.Install (device); }