[Ns-bugs] [Bug 587] ListRoutingProtocol priority handling buggy
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Wed Jun 10 07:20:25 PDT 2009
http://www.nsnam.org/bugzilla/show_bug.cgi?id=587
Tom Henderson <tomh at tomh.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tomh at tomh.org
--- Comment #4 from Tom Henderson <tomh at tomh.org> 2009-06-10 10:20:24 EDT ---
(In reply to comment #0)
> Created an attachment (id=463)
--> (http://www.nsnam.org/bugzilla/attachment.cgi?id=463) [details]
> remove stray '-'
>
> It appears that there is a stray '-' in
> src/internet-stack/ipv4-list-routing-impl.cc
>
The above was copied from Ipv4L3Protocol::AddRoutingProtocol, which I tested a
while back.
(In reply to comment #2)
> I should point out that if this is not a bug (which I think I sort of could
> understand), then, the bug is in
>
> Ipv4ListRoutingImpl::GetRoutingProtocol:
>
> priority = (*rprotoIter).first;
>
> should be instead:
>
> priority = -(*rprotoIter).first;
>
I think the above is the bug.
(In reply to comment #3)
> but, really, it would make sense not to invert the meaning of the priority
> field and, instead, either use an explicit sorting method which sorts from
> bigger to smaller or iterate over the list in reverse order with rbegin and
> rend
>
OK
--
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Ns-bugs
mailing list