1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc_rpl: make DODAG_CONF optional when joining DODAG

This commit is contained in:
Cenk Gündoğan 2016-03-15 16:34:06 +01:00
parent 3f5bf480fb
commit 39255ee8f8
2 changed files with 16 additions and 1 deletions

View File

@ -39,6 +39,16 @@
* CFLAGS += -DGNRC_RPL_DEFAULT_DIO_REDUNDANCY_CONSTANT=10
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* - Make reception of DODAG_CONF optional when joining a DODAG.
* This will use the default trickle parameters until a
* DODAG_CONF is received from the parent. The DODAG_CONF is
* requested once from the parent while joining the DODAG.
* The standard behaviour is to request a DODAG_CONF and join
* only a DODAG once a DODAG_CONF is received.
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ {.mk}
* CFLAGS += -DGNRC_RPL_DODAG_CONF_OPTIONAL_ON_JOIN
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*
* @{
*
* @file

View File

@ -567,10 +567,15 @@ void gnrc_rpl_recv_DIO(gnrc_rpl_dio_t *dio, ipv6_addr_t *src, uint16_t len)
}
if (!(included_opts & (((uint32_t) 1) << GNRC_RPL_OPT_DODAG_CONF))) {
#ifndef GNRC_RPL_DODAG_CONF_OPTIONAL_ON_JOIN
DEBUG("RPL: DIO without DODAG_CONF option - remove DODAG and request new DIO\n");
gnrc_rpl_instance_remove(inst);
gnrc_rpl_send_DIS(NULL, src);
return;
#else
DEBUG("RPL: DIO without DODAG_CONF option - use default trickle parameters\n");
gnrc_rpl_send_DIS(NULL, src);
#endif
}
gnrc_rpl_delay_dao(dodag);