Merge pull request #918 from cetic/pr-multi-dodag-support
Multi DODAG support
This commit is contained in:
commit
5a26d25647
1 changed files with 6 additions and 0 deletions
|
@ -813,6 +813,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;
|
||||||
|
@ -1372,6 +1375,9 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Parent info has been updated, trigger rank recalculation */
|
||||||
|
p->flags |= RPL_PARENT_FLAG_UPDATED;
|
||||||
|
|
||||||
PRINTF("RPL: preferred DAG ");
|
PRINTF("RPL: preferred DAG ");
|
||||||
PRINT6ADDR(&instance->current_dag->dag_id);
|
PRINT6ADDR(&instance->current_dag->dag_id);
|
||||||
PRINTF(", rank %u, min_rank %u, ",
|
PRINTF(", rank %u, min_rank %u, ",
|
||||||
|
|
Loading…
Reference in a new issue