Adds default route lifetime update in RPL DIO processing

This commit is contained in:
Sébastien Dawans 2013-02-05 15:43:13 +01:00
parent aaf5deabe2
commit b6c54faf9d

View File

@ -1223,6 +1223,9 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
RPL_LOLLIPOP_INCREMENT(instance->dtsn_out); RPL_LOLLIPOP_INCREMENT(instance->dtsn_out);
rpl_schedule_dao(instance); rpl_schedule_dao(instance);
} }
/* We received a new DIO from our preferred parent.
* Call uip_ds6_defrt_add to set a fresh value for the lifetime counter */
uip_ds6_defrt_add(from, RPL_LIFETIME(instance, instance->default_lifetime));
} }
p->dtsn = dio->dtsn; p->dtsn = dio->dtsn;
} }