Merge pull request #918 from cetic/pr-multi-dodag-support

Multi DODAG support
This commit is contained in:
Nicolas Tsiftes 2015-05-26 16:32:10 +02:00
commit 5a26d25647

View file

@ -813,6 +813,9 @@ rpl_select_parent(rpl_dag_t *dag)
if(best != NULL) {
rpl_set_preferred_parent(dag, best);
dag->rank = dag->instance->of->calculate_rank(dag->preferred_parent, 0);
} else {
dag->rank = INFINITE_RANK;
}
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 ");
PRINT6ADDR(&instance->current_dag->dag_id);
PRINTF(", rank %u, min_rank %u, ",