RPL: add neighbor to cache on incoming DIO also at the root
This commit is contained in:
parent
b32b3f6666
commit
ded71a7400
|
@ -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(dag->rank == ROOT_RANK(instance)) {
|
||||||
if(dio->rank != INFINITE_RANK) {
|
if(dio->rank != INFINITE_RANK) {
|
||||||
instance->dio_counter++;
|
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.
|
* 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);
|
p = rpl_find_parent(dag, from);
|
||||||
if(p == NULL) {
|
if(p == NULL) {
|
||||||
previous_dag = find_parent_dag(instance, from);
|
previous_dag = find_parent_dag(instance, from);
|
||||||
|
|
Loading…
Reference in a new issue