net: rpl: Fix router when it's timer expires
When router or default router timer expired, interface will remove router from the list. In this case RPL does not know about this. When RPL node receives DIO messages it only verifies whether parent exists or not. This extra checks will verify whether router really in "used" state or not. Jira: ZEP-2080 Change-Id: I4b36b3a2d495e76a38caddd058451daff08fab0c Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit is contained in:
parent
d9bde9a5ab
commit
5edf55f771
1 changed files with 12 additions and 0 deletions
|
@ -2625,6 +2625,18 @@ static void net_rpl_process_dio(struct net_if *iface,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (instance->default_route && !instance->default_route->is_used) {
|
||||||
|
/* Maybe router timer expired or removed and RPL doesn't
|
||||||
|
* know about it. Verify router is in "used" state or not.
|
||||||
|
*/
|
||||||
|
instance->default_route = net_if_ipv6_router_add(iface, from,
|
||||||
|
net_rpl_lifetime(instance,
|
||||||
|
instance->default_lifetime));
|
||||||
|
if (!instance->default_route) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (dag->rank == NET_RPL_ROOT_RANK(instance)) {
|
if (dag->rank == NET_RPL_ROOT_RANK(instance)) {
|
||||||
if (dio->rank != NET_RPL_INFINITE_RANK) {
|
if (dio->rank != NET_RPL_INFINITE_RANK) {
|
||||||
instance->dio_counter++;
|
instance->dio_counter++;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue