net: rpl: Fix invalid usage of router addition api
net_if_ipv6_router_add() will return router pointer on success. This information must be cached in RPL instance, otherwise RPL instance doesn't know about default route. Change-Id: Ic6d80ebfa95c9a64df9adf2621ae2631d9bdb990 Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit is contained in:
parent
5edf55f771
commit
ead481a041
1 changed files with 5 additions and 2 deletions
|
@ -2714,9 +2714,12 @@ static void net_rpl_process_dio(struct net_if *iface,
|
|||
* Add default route to set a fresh value for the lifetime
|
||||
* counter.
|
||||
*/
|
||||
net_if_ipv6_router_add(iface, from,
|
||||
net_rpl_lifetime(instance,
|
||||
instance->default_route = net_if_ipv6_router_add(iface, from,
|
||||
net_rpl_lifetime(instance,
|
||||
instance->default_lifetime));
|
||||
if (!instance->default_route) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
parent->dtsn = dio->dtsn;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue