From 35f32fe0738a426bd41ebaaa8fef8a792fa6f5b2 Mon Sep 17 00:00:00 2001 From: Tommaso Pecorella Date: Sat, 23 Aug 2014 17:37:24 +0200 Subject: [PATCH] Bug 1963 - AODV can tag the same packet twice (and raise an assert). --- RELEASE_NOTES | 1 + src/aodv/model/aodv-routing-protocol.cc | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES b/RELEASE_NOTES index 179a55215..8a5169297 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -41,6 +41,7 @@ Bugs fixed - Bug 1955 - The IPv4 identification field should be unique per (source, destination, protocol) tuple - Bug 1960 - Wrong information on index range, about Node::GetDevice - Bug 1961 - planetlab-tap-creator "variable set but not used" +- Bug 1963 - AODV can tag the same packet twice (and raise an assert) Known issues ------------ diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index d354b43cb..57f4f804d 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -1806,7 +1806,9 @@ RoutingProtocol::SendRerrMessage (Ptr packet, std::vector p Ptr socket = FindSocketWithInterfaceAddress (*i); NS_ASSERT (socket); NS_LOG_LOGIC ("Broadcast RERR message from interface " << i->GetLocal ()); + // std::cout << "Broadcast RERR message from interface " << i->GetLocal () << std::endl; // Send to all-hosts broadcast if on /32 addr, subnet-directed otherwise + Ptr p = packet->Copy (); Ipv4Address destination; if (i->GetMask () == Ipv4Mask::GetOnes ()) { @@ -1816,7 +1818,7 @@ RoutingProtocol::SendRerrMessage (Ptr packet, std::vector p { destination = i->GetBroadcast (); } - Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, packet, destination); + Simulator::Schedule (Time (MilliSeconds (m_uniformRandomVariable->GetInteger (0, 10))), &RoutingProtocol::SendTo, this, socket, p, destination); } }