bug 1097: AODV routing entry set to be VALID mistakenly (reported by Yang Chi)

This commit is contained in:
Tom Henderson
2011-05-12 23:14:54 -07:00
parent 3cbd6f9aa0
commit 2e9964060c
2 changed files with 9 additions and 5 deletions

View File

@@ -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
------------

View File

@@ -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;
}