1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

fix rpl_find_preferred_parent

This commit is contained in:
Ludwig Ortmann 2013-11-21 18:50:56 +01:00
parent c383ec4600
commit 336449d8bb

View File

@ -249,6 +249,10 @@ rpl_parent_t *rpl_find_preferred_parent(void)
return NULL;
}
if (my_dodag->my_preferred_parent == NULL) {
my_dodag->my_preferred_parent = best;
}
if (!rpl_equal_id(&my_dodag->my_preferred_parent->addr, &best->addr)) {
if (my_dodag->mop != NO_DOWNWARD_ROUTES) {
/* send DAO with ZERO_LIFETIME to old parent */