From a964380155c426a31e7eaa603d8b28648850be73 Mon Sep 17 00:00:00 2001 From: Laurent Deru Date: Fri, 31 Jan 2014 09:37:35 +0100 Subject: [PATCH] Rank error packet should not be forwarded --- core/net/rpl/rpl-ext-header.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/net/rpl/rpl-ext-header.c b/core/net/rpl/rpl-ext-header.c index d287bc4e6..3319e6d29 100644 --- a/core/net/rpl/rpl-ext-header.c +++ b/core/net/rpl/rpl-ext-header.c @@ -138,10 +138,9 @@ rpl_verify_header(int uip_ext_opt_offset) sender_closer); if(UIP_EXT_HDR_OPT_RPL_BUF->flags & RPL_HDR_OPT_RANK_ERR) { PRINTF("RPL: Rank error signalled in RPL option!\n"); - /* We should try to repair it, not implemented for the moment */ + /* Packet must be dropped and dio trickle timer reset, see RFC6550 - 11.2.2.2 */ rpl_reset_dio_timer(instance); - /* Forward the packet anyway. */ - return 0; + return 1; } PRINTF("RPL: Single error tolerated\n"); UIP_EXT_HDR_OPT_RPL_BUF->flags |= RPL_HDR_OPT_RANK_ERR;