Bugzilla – Bug 2335
assert failure on PointToPointNetDevice::Send() without NetDeviceQueueInterface
Last modified: 2016-03-12 19:14:33 UTC
because DCE uses its own IPv4/IPv6 instances in advanced mode (using Linux/FreeBSD kernel), an example script doesn't call TrafficControlLayer::SetupDevice() called via Ipv4L3Protocol::AddInterface() but it uses NetDevices (e.g. p2p, csma). and it results with assert failure due to lack of NetDeviceQueueInterface during P2PInterface:Send(). assert failed. cond="m_queueInterface", file=../src/point-to-point/model/point-to-point-net-device.cc, line=535 terminate called without an active exception Aborted (core dumped) In src/point-to-point/model/point-to-point-netdevice.cc 529 bool 530 PointToPointNetDevice::Send ( 531 Ptr<Packet> packet, 532 const Address &dest, 533 uint16_t protocolNumber) 534 { 535 NS_ASSERT (m_queueInterface); 536 Ptr<NetDeviceQueue> txq = m_queueInterface->GetTxQueue (0); 537 Does this NetDeviceQueue really depend on Layer 3 stuff ? Isn't it possible to handle during p2p device installation ?
Created attachment 2339 [details] patch to fix
> > Does this NetDeviceQueue really depend on Layer 3 stuff ? Isn't it possible > to handle during p2p device installation ? Fortunately it is easy to relax this assumption for now; patch attached should resolve it. We can revisit the assumptions concerning whether L3 protocols should be aware of this layer or not (and responsibility for installing this layer) post-release.
Tom, isn't better to initialize txq to 0? This way, we are sure that the subsequent if does not crash..
(In reply to natale.patriciello from comment #3) > Tom, isn't better to initialize txq to 0? This way, we are sure that the > subsequent if does not crash.. Is it necessary to initialize a Ptr<> to 0 or is that automatically done?
(In reply to Stefano Avallone from comment #4) > (In reply to natale.patriciello from comment #3) > > Tom, isn't better to initialize txq to 0? This way, we are sure that the > > subsequent if does not crash.. > > Is it necessary to initialize a Ptr<> to 0 or is that automatically done? It is not necessary; uninitialized Ptr<> will evaluate to 0.
(In reply to Tom Henderson from comment #1) > Created attachment 2339 [details] > patch to fix i confirmed the above patch alleviates the assert in my local tests. thanks.
pushed in changeset 14452cf32a37