From fd97136fee495ac0a261dbff642423a45db0ba0c Mon Sep 17 00:00:00 2001 From: Laurent Deru Date: Fri, 8 Nov 2013 15:41:24 +0100 Subject: [PATCH] As RPL Root, drop an incoming DIO from the same instance but different DAG --- core/net/rpl/rpl-dag.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 4bc4c1790..9f396202f 100644 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -1173,6 +1173,11 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio) return; } + if(instance->current_dag->rank == ROOT_RANK(instance) && instance->current_dag != dag) { + PRINTF("RPL: Root ignored DIO for different DAG\n"); + return; + } + if(dag == NULL) { PRINTF("RPL: Adding new DAG to known instance.\n"); rpl_add_dag(from, dio);