Merge pull request #373 from simonduq/contrib/rpl-local-repair

RPL local repair
This commit is contained in:
George Oikonomou 2018-03-25 16:08:45 +01:00 committed by GitHub
commit 22a1f12cc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -50,6 +50,7 @@
#include "net/mac/tsch/tsch-schedule.h"
#include "net/mac/tsch/tsch-log.h"
#include "net/mac/tsch/tsch-rpl.h"
#include "net/link-stats.h"
#if ROUTING_CONF_RPL_LITE
#include "net/routing/rpl-lite/rpl.h"
@ -83,6 +84,11 @@ tsch_rpl_callback_joining_network(void)
void
tsch_rpl_callback_leaving_network(void)
{
/* Forget past link statistics. If we are leaving a TSCH
network, there are changes we've been out of sync in the recent past, and
as a result have irrelevant link statistices. */
link_stats_reset();
/* RPL local repair */
NETSTACK_ROUTING.local_repair("TSCH leaving");
}
/*---------------------------------------------------------------------------*/

View File

@ -220,7 +220,6 @@ rpl_local_repair(const char *str)
curr_instance.dag.state = DAG_INITIALIZED; /* Reset DAG state */
}
curr_instance.of->reset(); /* Reset OF */
link_stats_reset(); /* Forget past link statistics */
rpl_neighbor_remove_all(); /* Remove all neighbors */
rpl_timers_dio_reset("Local repair"); /* Reset Trickle timer */
rpl_timers_schedule_state_update();