Bugzilla – Bug 2453
Neighbors' lifetime is not updated when RouteOutput is called
Last modified: 2017-05-18 04:04:36 EDT
Created attachment 2494 [details]
When a packet is sent by an application, the method RouteOutput of the Class aodv::RoutingProtocol is called. The lifetime of the entry in the routing table is updated, while the lifetime in the class AodvNeighbors is not updated.
This causes a mismatch between these 2 classes. The problem occurs when WifiMac trace TxErrHeader calls the callback method Neighbors::ProcessTxError (), because the following Purge () call does not find the right entry in the neighbors vector m_nb, so the callback m_handleLinkFailure is not triggered, and the protocol continues to use the same route, also if it is broken.
The bug occurs in simulations that last long and with a high node mobility.
The attached patch will fix this bug.
To have a confirmation of the bug just execute the example manet-routing-compare.cc with and without patch. Received packets change from 2797 to 3020 (adding up the Packets received column).
Excuse me if I made any mistake submitting this bug, it's just the second time I do it :).
Created attachment 2495 [details]
manet-routing-compare output without patch
Created attachment 2496 [details]
manet-routing-compare output with patch
Created attachment 2502 [details]
I fixed a potential error when AODV is used with more than one interface.
Created attachment 2583 [details]
Patch updated to last ns-3-dev version. Moreover, I improved it removing the loop and using the interface from RoutingTableEntry rt to check if the address is a broadcast address.