Improvements to local repair and DAO handling.

This commit is contained in:
nvt-se 2010-05-24 16:38:56 +00:00
parent f882901bf6
commit c5d1c3ea27
4 changed files with 39 additions and 36 deletions

View file

@ -32,7 +32,7 @@
*
* This file is part of the Contiki operating system.
*
* $Id: rpl-dag.c,v 1.6 2010/05/10 13:46:35 nifi Exp $
* $Id: rpl-dag.c,v 1.7 2010/05/24 16:38:56 nvt-se Exp $
*/
/**
* \file
@ -523,6 +523,11 @@ rpl_process_dio(uip_ipaddr_t *from, rpl_dio_t *dio)
if(RPL_PARENT_COUNT(dag) > 1) {
/* Since we have alternative parents, we can simply drop this one. */
rpl_remove_neighbor(dag, n);
n = rpl_find_best_parent(dag);
if(n != NULL) {
rpl_set_default_route(dag, &n->addr);
}
return;
} else if(dag->of->increment_rank(dio->dag_rank, n) <= dag->min_rank + dag->max_rankinc) {
dag->rank = dag->of->increment_rank(dio->dag_rank, n);
PRINTF("RPL: New rank is %hu, max is %hu\n",