diff --git a/core/net/rpl/rpl.c b/core/net/rpl/rpl.c index 9fca4c28e..c1384b0b6 100644 --- a/core/net/rpl/rpl.c +++ b/core/net/rpl/rpl.c @@ -308,6 +308,8 @@ rpl_init(void) #if RPL_CONF_STATS memset(&rpl_stats, 0, sizeof(rpl_stats)); #endif + + RPL_OF.reset(NULL); } /*---------------------------------------------------------------------------*/ #endif /* UIP_CONF_IPV6 */ diff --git a/core/net/rpl/rpl.h b/core/net/rpl/rpl.h index 562961d84..76134e44e 100644 --- a/core/net/rpl/rpl.h +++ b/core/net/rpl/rpl.h @@ -189,6 +189,9 @@ struct rpl_of { rpl_ocp_t ocp; }; typedef struct rpl_of rpl_of_t; + +/* Declare the selected objective function. */ +extern rpl_of_t RPL_OF; /*---------------------------------------------------------------------------*/ /* Instance */ struct rpl_instance {