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:
parent
d008bf8a76
commit
e6cd029090
@ -215,12 +215,10 @@ rpl_remove_routes_by_nexthop(uip_ipaddr_t *nexthop, rpl_dag_t *dag)
|
|||||||
|
|
||||||
while(r != NULL) {
|
while(r != NULL) {
|
||||||
if(uip_ipaddr_cmp(uip_ds6_route_nexthop(r), nexthop) &&
|
if(uip_ipaddr_cmp(uip_ds6_route_nexthop(r), nexthop) &&
|
||||||
r->state.dag == dag) {
|
r->state.dag == dag) {
|
||||||
uip_ds6_route_rm(r);
|
r->state.lifetime = 0;
|
||||||
r = uip_ds6_route_head();
|
|
||||||
} else {
|
|
||||||
r = uip_ds6_route_next(r);
|
|
||||||
}
|
}
|
||||||
|
r = uip_ds6_route_next(r);
|
||||||
}
|
}
|
||||||
ANNOTATE("#L %u 0\n", nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
|
ANNOTATE("#L %u 0\n", nexthop->u8[sizeof(uip_ipaddr_t) - 1]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user