From 778d40dab7f6bcc1c4537e7eaf57fcdde0c0e56e Mon Sep 17 00:00:00 2001 From: Laurent Deru Date: Wed, 22 Jan 2014 15:26:43 +0100 Subject: [PATCH] Do not trigger global repair when forwarding error is detected --- core/net/rpl/rpl-ext-header.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/core/net/rpl/rpl-ext-header.c b/core/net/rpl/rpl-ext-header.c index dde2777f9..d287bc4e6 100644 --- a/core/net/rpl/rpl-ext-header.c +++ b/core/net/rpl/rpl-ext-header.c @@ -105,19 +105,12 @@ rpl_verify_header(int uip_ext_opt_offset) route = uip_ds6_route_lookup(&UIP_IP_BUF->destipaddr); if(route != NULL) { uip_ds6_route_rm(route); - - /* If we are the root and just needed to remove a DAO route, - chances are that the network needs to be repaired. The - rpl_repair_root() function will cause a global repair if we - happen to be the root node of the dag. */ - PRINTF("RPL: initiate global repair\n"); - rpl_repair_root(instance->instance_id); } - - /* Remove the forwarding error flag and return 0 to let the packet - be forwarded again. */ - UIP_EXT_HDR_OPT_RPL_BUF->flags &= ~RPL_HDR_OPT_FWD_ERR; - return 0; + RPL_STAT(rpl_stats.forward_errors++); + /* Trigger DAO retransmission */ + rpl_reset_dio_timer(instance); + /* drop the packet as it is not routable */ + return 1; } if(!instance->current_dag->joined) {