mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-10-07 22:56:19 +00:00
Send No-Path DAOs correctly.
This commit is contained in:
parent
4b5d380c74
commit
15ee0a6414
@ -357,6 +357,9 @@ rpl_select_parent(rpl_dag_t *dag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(dag->preferred_parent != best) {
|
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->preferred_parent = best; /* Cache the value. */
|
||||||
dag->of->update_metric_container(dag);
|
dag->of->update_metric_container(dag);
|
||||||
rpl_set_default_route(dag, &best->addr);
|
rpl_set_default_route(dag, &best->addr);
|
||||||
@ -377,7 +380,7 @@ rpl_select_parent(rpl_dag_t *dag)
|
|||||||
dag->min_rank = dag->rank;
|
dag->min_rank = dag->rank;
|
||||||
} else if(!acceptable_rank(dag, best->rank)) {
|
} else if(!acceptable_rank(dag, best->rank)) {
|
||||||
/* Send a No-Path DAO to the soon-to-be-removed preferred parent. */
|
/* 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);
|
remove_parents(dag, 0);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user