[Ns-developers] AODV bug

Marco Fiore fl0wer at virgilio.it
Wed Jan 23 01:59:43 PST 2008


Hi all,

I found the following bug in ns-2.31 AODV implementation.
In 
the forward() function, all broadcast packets are delayed
by a 
uniformly distributed amount of time in [0,10]ms.
I think this is to 
introduce jitter in AODV-related broadcast
messages.

However, this 
also affects broadcasts from upper layers,
which I find unmotivated and 
even disruptive (as in the
case of an application I'm coding).
Thus, I 
suggest that the following fix is introduced in the
next release of the 
code:

diff aodv_patched/aodv.cc aodv/aodv.cc
1036,1046c1036,1040
<        // Added by Marco Fiore to avoid random jitter on non-AODV 
broadcasts
<        if(ch->ptype() == PT_AODV) {
<      /*
<       *  
Jitter the sending of broadcast packets by 10ms
<       */
<      
Scheduler::instance().schedule(target_, p,
<                                          0.01 * Random::uniform());
<    }
<    else {
<      Scheduler::instance().schedule(target_, p, 
0.);
<        }
---
>    /*
>     *  Jitter the sending of broadcast 
packets by 10ms
>     */
>    Scheduler::instance().schedule(target_, 
p,
>                                          0.01 * Random::
uniform());

thanks,

Marco




More information about the Ns-developers mailing list