From 6cdec707985f6a5e2272271370bf533a6f323e35 Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Fri, 3 Jun 2016 21:18:15 +0200 Subject: [PATCH] rpl_verify_header: do not select DAG in storing mode after updating neighbor rank, as this may result in a No-Path DAO being sent, which will drop the current packet. --- core/net/rpl/rpl-ext-header.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/net/rpl/rpl-ext-header.c b/core/net/rpl/rpl-ext-header.c index 6015fcb57..41da2149e 100644 --- a/core/net/rpl/rpl-ext-header.c +++ b/core/net/rpl/rpl-ext-header.c @@ -136,7 +136,12 @@ rpl_verify_hbh_header(int uip_ext_opt_offset) /* A rank error was signalled, attempt to repair it by updating * the sender's rank from ext header */ sender->rank = sender_rank; - rpl_select_dag(instance, sender); + if(RPL_IS_NON_STORING(instance)) { + /* Select DAG and preferred parent only in non-storing mode. In storing mode, + * a parent switch would result in an immediate No-path DAO transmission, dropping + * current incoming packet. */ + rpl_select_dag(instance, sender); + } } sender_closer = sender_rank < instance->current_dag->rank;