Bugfix: DIOs with infinite ranks should not be ignored as they are used by RPL as a signal by nodes that have lost their routes. Instead of ignoring them, we should send out our latest information to let the node with infinite rank find their way into the network again.
This commit is contained in:
parent
10f64c0ce8
commit
512a339c50
1 changed files with 1 additions and 8 deletions
|
@ -630,7 +630,7 @@ rpl_select_dag(rpl_instance_t *instance, rpl_parent_t *p)
|
|||
instance->of->update_metric_container(instance);
|
||||
/* Update the DAG rank. */
|
||||
best_dag->rank = instance->of->calculate_rank(best_dag->preferred_parent, 0);
|
||||
if(best_dag->rank < best_dag->min_rank) {
|
||||
if(last_parent == NULL || best_dag->rank < best_dag->min_rank) {
|
||||
best_dag->min_rank = best_dag->rank;
|
||||
} else if(!acceptable_rank(best_dag, best_dag->rank)) {
|
||||
PRINTF("RPL: New rank unacceptable!\n");
|
||||
|
@ -1143,13 +1143,6 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
|
|||
}
|
||||
}
|
||||
|
||||
if(dio->rank == INFINITE_RANK) {
|
||||
PRINTF("RPL: Ignoring DIO from node with infinite rank: ");
|
||||
PRINT6ADDR(from);
|
||||
PRINTF("\n");
|
||||
return;
|
||||
}
|
||||
|
||||
if(instance == NULL) {
|
||||
PRINTF("RPL: New instance detected: Joining...\n");
|
||||
rpl_join_instance(from, dio);
|
||||
|
|
Loading…
Reference in a new issue