RPL: add neighbor to cache on incoming DIO also at the root

This commit is contained in:
Simon Duquennoy 2016-04-25 17:13:10 +02:00
parent b32b3f6666
commit ded71a7400
1 changed files with 5 additions and 5 deletions

View File

@ -1527,6 +1527,11 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
}
}
if(!add_nbr_from_dio(from, dio)) {
PRINTF("RPL: Could not add parent based on DIO\n");
return;
}
if(dag->rank == ROOT_RANK(instance)) {
if(dio->rank != INFINITE_RANK) {
instance->dio_counter++;
@ -1547,11 +1552,6 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
* whether to keep it in the set.
*/
if(!add_nbr_from_dio(from, dio)) {
PRINTF("RPL: Could not add parent based on DIO\n");
return;
}
p = rpl_find_parent(dag, from);
if(p == NULL) {
previous_dag = find_parent_dag(instance, from);