Loop detection via DAO: if we get a DAO from a parent, that parent thinks we are its parent. We poison it and recalulate our parents.
This commit is contained in:
parent
34119b7ef2
commit
e5a6565137
1 changed files with 8 additions and 0 deletions
|
@ -698,6 +698,14 @@ dao_input(void)
|
||||||
p->updated = 1;
|
p->updated = 1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* If we get the DAO from our parent, we also have a loop. */
|
||||||
|
if(p != NULL && p == dag->preferred_parent) {
|
||||||
|
PRINTF("RPL: Loop detected when receiving a unicast DAO from our parent\n");
|
||||||
|
p->rank = INFINITE_RANK;
|
||||||
|
p->updated = 1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PRINTF("RPL: adding DAO route\n");
|
PRINTF("RPL: adding DAO route\n");
|
||||||
|
|
Loading…
Reference in a new issue