Make RPL route lifetime RFC compliant

This commit is contained in:
Laurent Deru 2016-04-07 11:40:00 +02:00
parent c1f11cfaa9
commit d866e6bd34
3 changed files with 9 additions and 3 deletions

View file

@ -122,7 +122,7 @@ rpl_purge_routes(void)
r = uip_ds6_route_head();
while(r != NULL) {
if(r->state.lifetime >= 1) {
if(r->state.lifetime >= 1 && r->state.lifetime != RPL_ROUTE_INFINITE_LIFETIME) {
/*
* If a route is at lifetime == 1, set it to 0, scheduling it for
* immediate removal below. This achieves the same as the original code,