[ns] 1. bug in the NIST addon (+fix) (naouar yaagoubi)
Imad Abdeljaouad
abdeljaouad at gmail.com
Fri Jun 19 16:58:52 PDT 2009
Thank you, indeed you are right and that's a serious bug that would
certainly lead to very bad and unexpected results!!!
I hope the NIST will update their code in their release!!!
Message: 1
> Date: Thu, 18 Jun 2009 20:00:51 -0400
> From: naouar yaagoubi <naouary at gmail.com>
> Subject: [ns] bug in the NIST addon (+fix)
> To: ns-users at ISI.EDU
> Message-ID:
> <37d2f4200906181700w3d817e47j7a156bbe06c562d6 at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> hi all,
> I have discovered a bug in the nist addon in the channel.cc file:
>
> this piece of code compute the affected nodes in the range of the sending
> node so that the channel object will send the packet to their NetIf
>
> for(tmp = xListHead_; tmp != NULL; tmp = tmp->nextX_) {
> if(tmp->Y() >= ymin && tmp->Y() <= ymax && tmp->X() >= xmin &&
> tmp->Y() <= ymax)
> tmpList[n++] = tmp;
> }
>
> As you can see the tmp->Y() <= ymax is repeated twice in the If statement.
> To correct this issue just change one of the tmp->Y() <= ymax to tmp->X()
> <=
> xmax
>
> best regards
>
--
best regards,
________________________
Imad Abdeljaouad
More information about the Ns-users
mailing list