Merge pull request #406 from cetic/hotfix-rplroot-discard-dio

Drop incoming DIO when RPL Root
This commit is contained in:
Nicolas Tsiftes 2013-11-15 07:38:00 -08:00
commit 90d39095f8

View file

@ -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);