rpl_remove_routes_by_nexthop: expire routes rather than remove then directly. The routes will be removed later and No-path DAOs sent accordingly in rpl_purge_routes

This commit is contained in:
Simon Duquennoy 2016-06-03 12:48:02 +02:00 committed by Simon Duquennoy
parent d008bf8a76
commit e6cd029090

View File

@ -215,12 +215,10 @@ rpl_remove_routes_by_nexthop(uip_ipaddr_t *nexthop, rpl_dag_t *dag)
while(r != NULL) {
if(uip_ipaddr_cmp(uip_ds6_route_nexthop(r), nexthop) &&
r->state.dag == dag) {
uip_ds6_route_rm(r);
r = uip_ds6_route_head();
} else {
r = uip_ds6_route_next(r);
r->state.dag == dag) {
r->state.lifetime = 0;
}
r = uip_ds6_route_next(r);
}
ANNOTATE("#L %u 0\n", nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
}