Send No-Path DAOs correctly.
This commit is contained in:
parent
4b5d380c74
commit
15ee0a6414
1 changed files with 4 additions and 1 deletions
|
@ -357,6 +357,9 @@ rpl_select_parent(rpl_dag_t *dag)
|
|||
}
|
||||
|
||||
if(dag->preferred_parent != best) {
|
||||
PRINTF("RPL: Sending a No-Path DAO to old DAO parent\n");
|
||||
dao_output(dag->preferred_parent, ZERO_LIFETIME);
|
||||
|
||||
dag->preferred_parent = best; /* Cache the value. */
|
||||
dag->of->update_metric_container(dag);
|
||||
rpl_set_default_route(dag, &best->addr);
|
||||
|
@ -377,7 +380,7 @@ rpl_select_parent(rpl_dag_t *dag)
|
|||
dag->min_rank = dag->rank;
|
||||
} else if(!acceptable_rank(dag, best->rank)) {
|
||||
/* Send a No-Path DAO to the soon-to-be-removed preferred parent. */
|
||||
dao_output(p, ZERO_LIFETIME);
|
||||
dao_output(best, ZERO_LIFETIME);
|
||||
|
||||
remove_parents(dag, 0);
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue