diff --git a/RELEASE_NOTES b/RELEASE_NOTES index dc978d706..4933cb980 100644 --- a/RELEASE_NOTES +++ b/RELEASE_NOTES @@ -76,6 +76,7 @@ since ns-3.10, in many cases referencing the Bugzilla bug number. - bug 1058 - documentation help to avoid InternetStackHelper pitfall - bug 1054 - ipv6 InternetStackHelper EnablePcapIpv6All() broken - bug 1042 - AODV RERR implosion (missing RERR_RATELIMIT) + - bug 1097 - AODV routing entry set to be VALID mistakenly Known issues ------------ diff --git a/src/aodv/model/aodv-routing-protocol.cc b/src/aodv/model/aodv-routing-protocol.cc index 0c4b44995..4a2fcf5ef 100644 --- a/src/aodv/model/aodv-routing-protocol.cc +++ b/src/aodv/model/aodv-routing-protocol.cc @@ -947,11 +947,14 @@ RoutingProtocol::UpdateRouteLifeTime (Ipv4Address addr, Time lifetime) RoutingTableEntry rt; if (m_routingTable.LookupRoute (addr, rt)) { - rt.SetFlag (VALID); - rt.SetRreqCnt (0); - rt.SetLifeTime (std::max (lifetime, rt.GetLifeTime ())); - m_routingTable.Update (rt); - return true; + if (rt.GetFlag () == VALID) + { + NS_LOG_DEBUG ("Updating VALID route"); + rt.SetRreqCnt (0); + rt.SetLifeTime (std::max (lifetime, rt.GetLifeTime ())); + m_routingTable.Update (rt); + return true; + } } return false; }