1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2026-01-01 01:41:18 +01:00

Merge pull request #359 from LudwigOrtmann/recv_rpl_dio

fix recv_rpl_dio, missing return, refactor
This commit is contained in:
LudwigOrtmann 2013-11-23 02:05:29 -08:00
commit c383ec4600

View File

@ -631,22 +631,18 @@ void recv_rpl_dio(void)
if (!has_dodag_conf_opt) {
DEBUG("send DIS\n");
send_DIS(&ipv6_buf->srcaddr);
return;
}
if (rpl_dio_buf->rank < ROOT_RANK) {
DEBUG("DIO with Rank < ROOT_RANK\n");
return;
}
if (dio_dodag.mop != RPL_DEFAULT_MOP) {
DEBUG("Required MOP not supported\n");
return;
}
if (dio_dodag.of == NULL) {
DEBUG("Required objective function not supported\n");
return;
}
if (rpl_dio_buf->rank != INFINITE_RANK) {
@ -655,8 +651,8 @@ void recv_rpl_dio(void)
}
else {
DEBUG("Cannot access DODAG because of DIO with infinite rank\n");
return;
}
return;
}
if (rpl_equal_id(&my_dodag->dodag_id, &dio_dodag.dodag_id)) {