uip : When creating a route with a "state" field, clear it (It's possible that the process responsible for this creation doesn't handle the state field)

This commit is contained in:
Vincent Brillault 2011-07-13 10:31:22 +02:00
parent 4f76130a77
commit d8d9494168
1 changed files with 4 additions and 0 deletions

View File

@ -784,6 +784,10 @@ uip_ds6_route_add(uip_ipaddr_t *ipaddr, uint8_t length, uip_ipaddr_t *nexthop,
uip_ipaddr_copy(&(locroute->nexthop), nexthop);
locroute->metric = metric;
#ifdef UIP_DS6_ROUTE_STATE_TYPE
memset (&(locroute->state),0,sizeof(UIP_DS6_ROUTE_STATE_TYPE));
#endif
PRINTF("DS6: adding route: ");
PRINT6ADDR(ipaddr);
PRINTF(" via ");