diff --git a/core/net/rpl/rpl-dag.c b/core/net/rpl/rpl-dag.c index 53ba956fa..5bc15d7af 100644 --- a/core/net/rpl/rpl-dag.c +++ b/core/net/rpl/rpl-dag.c @@ -948,6 +948,7 @@ rpl_join_instance(uip_ipaddr_t *from, rpl_dio_t *dio) } } +#if RPL_MAX_DAG_PER_INSTANCE > 1 /*---------------------------------------------------------------------------*/ void rpl_add_dag(uip_ipaddr_t *from, rpl_dio_t *dio) @@ -1027,6 +1028,7 @@ rpl_add_dag(uip_ipaddr_t *from, rpl_dio_t *dio) rpl_process_parent_event(instance, p); p->dtsn = dio->dtsn; } +#endif /* RPL_MAX_DAG_PER_INSTANCE > 1 */ /*---------------------------------------------------------------------------*/ static void @@ -1214,9 +1216,14 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio) } if(dag == NULL) { +#if RPL_MAX_DAG_PER_INSTANCE > 1 PRINTF("RPL: Adding new DAG to known instance.\n"); rpl_add_dag(from, dio); return; +#else /* RPL_MAX_DAG_PER_INSTANCE > 1 */ + PRINTF("RPL: Only one instance supported.\n"); + return; +#endif /* RPL_MAX_DAG_PER_INSTANCE > 1 */ }