From ded71a7400ec312bfbbf85c8971fcc9bfdd17fca Mon Sep 17 00:00:00 2001 From: Simon Duquennoy Date: Mon, 25 Apr 2016 17:13:10 +0200 Subject: [PATCH] RPL: add neighbor to cache on incoming DIO also at the root --- core/net/rpl/rpl-dag.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index ced73990f..2077c4eb4 100644 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -1527,6 +1527,11 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio) } } + if(!add_nbr_from_dio(from, dio)) { + PRINTF("RPL: Could not add parent based on DIO\n"); + return; + } + if(dag->rank == ROOT_RANK(instance)) { if(dio->rank != INFINITE_RANK) { instance->dio_counter++; @@ -1547,11 +1552,6 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio) * whether to keep it in the set. */ - if(!add_nbr_from_dio(from, dio)) { - PRINTF("RPL: Could not add parent based on DIO\n"); - return; - } - p = rpl_find_parent(dag, from); if(p == NULL) { previous_dag = find_parent_dag(instance, from);