mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
set received parent lifetime when creating a new parent
This commit is contained in:
parent
60880821fa
commit
fce4f556a8
@ -150,6 +150,7 @@ rpl_parent_t *rpl_new_parent(rpl_dodag_t *dodag, ipv6_addr_t *address, uint16_t
|
||||
parent->addr = *address;
|
||||
parent->rank = rank;
|
||||
parent->dodag = dodag;
|
||||
parent->lifetime = dodag->default_lifetime * dodag->lifetime_unit;
|
||||
/* dtsn is set at the end of recv_dio function */
|
||||
parent->dtsn = 0;
|
||||
return parent;
|
||||
@ -305,7 +306,7 @@ void rpl_join_dodag(rpl_dodag_t *dodag, ipv6_addr_t *parent, uint16_t parent_ran
|
||||
return;
|
||||
}
|
||||
|
||||
preferred_parent = rpl_new_parent(my_dodag, parent, parent_rank);
|
||||
preferred_parent = rpl_new_parent(dodag, parent, parent_rank);
|
||||
|
||||
if (preferred_parent == NULL) {
|
||||
rpl_del_dodag(my_dodag);
|
||||
|
Loading…
Reference in New Issue
Block a user