RPL: re-enable RPL_DIO_REFRESH_DAO_ROUTES by default as it is needed with DAO-ACK disabled. Now increments the DTSN only at the root
This commit is contained in:
parent
c3ea1f9fc6
commit
343c274359
|
@ -257,15 +257,16 @@
|
||||||
#endif /* RPL_CONF_RPL_REPAIR_ON_DAO_NACK */
|
#endif /* RPL_CONF_RPL_REPAIR_ON_DAO_NACK */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Setting the DIO_REFRESH_DAO_ROUTES will make RPL always increase
|
* Setting the DIO_REFRESH_DAO_ROUTES will make the RPL root always
|
||||||
* the DTSN (Destination Advertisement Trigger Sequence Number) when
|
* increase the DTSN (Destination Advertisement Trigger Sequence Number)
|
||||||
* sending broadcast DIO. This is to get all children to re-register
|
* when sending multicast DIO. This is to get all children to re-register
|
||||||
* their DAO route.
|
* their DAO route. This is needed when DAO-ACK is not enabled to add
|
||||||
|
* reliability to route maintenance.
|
||||||
* */
|
* */
|
||||||
#ifdef RPL_CONF_DIO_REFRESH_DAO_ROUTES
|
#ifdef RPL_CONF_DIO_REFRESH_DAO_ROUTES
|
||||||
#define RPL_DIO_REFRESH_DAO_ROUTES RPL_CONF_DIO_REFRESH_DAO_ROUTES
|
#define RPL_DIO_REFRESH_DAO_ROUTES RPL_CONF_DIO_REFRESH_DAO_ROUTES
|
||||||
#else
|
#else
|
||||||
#define RPL_DIO_REFRESH_DAO_ROUTES 0
|
#define RPL_DIO_REFRESH_DAO_ROUTES 1
|
||||||
#endif /* RPL_CONF_DIO_REFRESH_DAO_ROUTES */
|
#endif /* RPL_CONF_DIO_REFRESH_DAO_ROUTES */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -479,6 +479,7 @@ dio_output(rpl_instance_t *instance, uip_ipaddr_t *uc_addr)
|
||||||
{
|
{
|
||||||
unsigned char *buffer;
|
unsigned char *buffer;
|
||||||
int pos;
|
int pos;
|
||||||
|
int is_root;
|
||||||
rpl_dag_t *dag = instance->current_dag;
|
rpl_dag_t *dag = instance->current_dag;
|
||||||
#if !RPL_LEAF_ONLY
|
#if !RPL_LEAF_ONLY
|
||||||
uip_ipaddr_t addr;
|
uip_ipaddr_t addr;
|
||||||
|
@ -499,6 +500,7 @@ dio_output(rpl_instance_t *instance, uip_ipaddr_t *uc_addr)
|
||||||
buffer = UIP_ICMP_PAYLOAD;
|
buffer = UIP_ICMP_PAYLOAD;
|
||||||
buffer[pos++] = instance->instance_id;
|
buffer[pos++] = instance->instance_id;
|
||||||
buffer[pos++] = dag->version;
|
buffer[pos++] = dag->version;
|
||||||
|
is_root = (dag->rank == ROOT_RANK(instance));
|
||||||
|
|
||||||
#if RPL_LEAF_ONLY
|
#if RPL_LEAF_ONLY
|
||||||
PRINTF("RPL: LEAF ONLY DIO rank set to INFINITE_RANK\n");
|
PRINTF("RPL: LEAF ONLY DIO rank set to INFINITE_RANK\n");
|
||||||
|
@ -519,7 +521,7 @@ dio_output(rpl_instance_t *instance, uip_ipaddr_t *uc_addr)
|
||||||
|
|
||||||
buffer[pos++] = instance->dtsn_out;
|
buffer[pos++] = instance->dtsn_out;
|
||||||
|
|
||||||
if(RPL_DIO_REFRESH_DAO_ROUTES && uc_addr == NULL) {
|
if(RPL_DIO_REFRESH_DAO_ROUTES && is_root && uc_addr == NULL) {
|
||||||
/* Request new DAO to refresh route. We do not do this for unicast DIO
|
/* Request new DAO to refresh route. We do not do this for unicast DIO
|
||||||
* in order to avoid DAO messages after a DIS-DIO update,
|
* in order to avoid DAO messages after a DIS-DIO update,
|
||||||
* or upon unicast DIO probing. */
|
* or upon unicast DIO probing. */
|
||||||
|
|
Loading…
Reference in a new issue