Add DAG lifetime
This commit is contained in:
parent
0a648df3c3
commit
34126173b4
6 changed files with 49 additions and 0 deletions
|
@ -1334,6 +1334,12 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
|
|||
return;
|
||||
}
|
||||
|
||||
/* The DIO comes from a valid DAG, we can refresh its lifetime */
|
||||
dag->lifetime = (1UL << (instance->dio_intmin + instance->dio_intdoubl)) / 1000;
|
||||
PRINTF("Set dag ");
|
||||
PRINT6ADDR(&dag->dag_id);
|
||||
PRINTF(" lifetime to %ld\n", dag->lifetime);
|
||||
|
||||
/*
|
||||
* At this point, we know that this DIO pertains to a DAG that
|
||||
* we are already part of. We consider the sender of the DIO to be
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue