rpl_select_parent: Update dag rank according to new parent
This commit is contained in:
parent
7286c9a635
commit
ccd3c58280
@ -741,6 +741,9 @@ rpl_select_parent(rpl_dag_t *dag)
|
|||||||
|
|
||||||
if(best != NULL) {
|
if(best != NULL) {
|
||||||
rpl_set_preferred_parent(dag, best);
|
rpl_set_preferred_parent(dag, best);
|
||||||
|
dag->rank = dag->instance->of->calculate_rank(dag->preferred_parent, 0);
|
||||||
|
} else {
|
||||||
|
dag->rank = INFINITE_RANK;
|
||||||
}
|
}
|
||||||
|
|
||||||
return best;
|
return best;
|
||||||
|
Loading…
Reference in New Issue
Block a user