diff --git a/core/net/rpl/rpl-ext-header.c b/core/net/rpl/rpl-ext-header.c index 3d5938879..310c056cb 100644 --- a/core/net/rpl/rpl-ext-header.c +++ b/core/net/rpl/rpl-ext-header.c @@ -69,6 +69,7 @@ rpl_verify_header(int uip_ext_opt_offset) rpl_instance_t *instance; int down; uint8_t sender_closer; + uip_ds6_route_t *route; if(UIP_EXT_HDR_OPT_RPL_BUF->opt_len != RPL_HDR_OPT_LEN) { PRINTF("RPL: Bad header option! (wrong length)\n"); @@ -88,7 +89,6 @@ rpl_verify_header(int uip_ext_opt_offset) the packet to be forwareded in the first place. We drop any routes that go through the neighbor that sent the packet to us. */ - uip_ds6_route_t *route; route = uip_ds6_route_lookup(&UIP_IP_BUF->destipaddr); if(route != NULL) { uip_ds6_route_rm(route); diff --git a/core/net/rpl/rpl-icmp6.c b/core/net/rpl/rpl-icmp6.c index a749a65c4..f1d5a5e04 100644 --- a/core/net/rpl/rpl-icmp6.c +++ b/core/net/rpl/rpl-icmp6.c @@ -579,6 +579,7 @@ dao_input(void) int i; int learned_from; rpl_parent_t *p; + uip_ds6_nbr_t *nbr; prefixlen = 0; @@ -716,7 +717,6 @@ dao_input(void) PRINTF("RPL: adding DAO route\n"); - uip_ds6_nbr_t *nbr; if((nbr = uip_ds6_nbr_lookup(&dao_sender_addr)) == NULL) { if((nbr = uip_ds6_nbr_add(&dao_sender_addr, (uip_lladdr_t *)packetbuf_addr(PACKETBUF_ADDR_SENDER),