[riot-notifications] [RIOT] aodvv2: fix one-off metric bug (#3244)

Lotte Steenbrink notifications at github.com
Tue Jun 23 15:17:22 CEST 2015


Given the following topology:
A->B->....
When receiving a RREQ, B will store the route back towards A with a metric value of 2, i.e. B assumes that A is two rather than one hop away. This is caused by ``link_cost`` being added to the old metric value twice, once during the packet handling and once when adding the route table entry. 
This PR fixes this bug and gets rid of the rather confusing ``_update_metric()`` in favor of ``_get_route_cost()``, which is closer to the AODVv2 spec, too.
You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/3244

-- Commit Summary --

  * aodvv2: fix one-off metric bug

-- File Changes --

    M sys/net/routing/aodvv2/reader.c (36)
    M sys/net/routing/aodvv2/routingtable.c (10)
    M sys/net/routing/aodvv2/routingtable.h (6)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/3244.patch
https://github.com/RIOT-OS/RIOT/pull/3244.diff

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3244
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150623/da16f592/attachment.html>


More information about the notifications mailing list