Bug 1097

Summary: AODV routing entry set to be VALID mistakenly.
Product: ns-3 Reporter: Yang Chi <yangchi.cn>
Component: aodvAssignee: Elena Buchatskaya <sunnmy>
Status: RESOLVED FIXED    
Severity: trivial CC: ns-bugs, tomh
Priority: P5    
Version: ns-3.10   
Hardware: PC   
OS: Linux   
Attachments: patch to fix

Description Yang Chi 2011-04-12 16:52:25 UTC
In aodv source code of ns-3.10, specifically, in aodv::RoutingProtocol::UpdateRouteLifeTime(), rt.SetFlag(VALID) is called. But this will make a IN_SEARCH entry set to VALID without really receiving a valid aodv reply. Then 102.102.102.102 would be used as a VALID nexthop.

A quick fix can be something like this;

 if(rt.GetFlag() ==VALID)
     rt.SetFlag (VALID);
Comment 1 Tom Henderson 2011-04-15 19:14:43 UTC
(In reply to comment #0)
> In aodv source code of ns-3.10, specifically, in
> aodv::RoutingProtocol::UpdateRouteLifeTime(), rt.SetFlag(VALID) is called. But
> this will make a IN_SEARCH entry set to VALID without really receiving a valid
> aodv reply. Then 102.102.102.102 would be used as a VALID nexthop.
> 
> A quick fix can be something like this;
> 
>  if(rt.GetFlag() ==VALID)
>      rt.SetFlag (VALID);

I can confirm this is being called for INVALID routes.  I'm not sure of the suggested fix (which appears to be a no-op).  Deleting the SetFlag() call does not solve all of AODV's performance problems (bug 1099).
Comment 2 Tom Henderson 2011-05-12 09:42:34 UTC
Created attachment 1111 [details]
patch to fix

I tested the attached against the scenario file found in bug 1099 and the patch catches a number of mistakenly validated routes, and improves performance.
Comment 3 Tom Henderson 2011-05-13 02:16:01 UTC
changeset: 4082270126b5