Update next-hop address for existing routes.

This commit is contained in:
Nicolas Tsiftes 2011-11-16 09:05:34 +01:00
parent ef0ce944e5
commit b405571e32

View file

@ -632,13 +632,11 @@ dao_input(void)
} }
} }
rep = rpl_add_route(dag, &prefix, prefixlen, &dao_sender_addr);
if(rep == NULL) { if(rep == NULL) {
rep = rpl_add_route(dag, &prefix, prefixlen, &dao_sender_addr); RPL_STAT(rpl_stats.mem_overflows++);
if(rep == NULL) { PRINTF("RPL: Could not add a route after receiving a DAO\n");
RPL_STAT(rpl_stats.mem_overflows++); return;
PRINTF("RPL: Could not add a route after receiving a DAO\n");
return;
}
} }
rep->state.lifetime = RPL_LIFETIME(instance, lifetime); rep->state.lifetime = RPL_LIFETIME(instance, lifetime);