mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-19 18:40:17 +00:00
fix: default routes are removed correctly if no DAG with preferred parent is available
This commit is contained in:
parent
10f64c0ce8
commit
9dd5af78c8
@ -703,7 +703,9 @@ rpl_remove_parent(rpl_dag_t *dag, rpl_parent_t *parent)
|
||||
void
|
||||
rpl_nullify_parent(rpl_dag_t *dag, rpl_parent_t *parent)
|
||||
{
|
||||
if(parent == dag->preferred_parent) {
|
||||
// local repair calls nullification because the preferred parent is NULL!
|
||||
// So check if parent is NULL to trigger uip_ds6_defrt_rm.
|
||||
if(parent == dag->preferred_parent || dag->preferred_parent == NULL) {
|
||||
dag->preferred_parent = NULL;
|
||||
dag->rank = INFINITE_RANK;
|
||||
if(dag->joined) {
|
||||
|
Loading…
Reference in New Issue
Block a user