From 9cd84563cba597903f0eaea06f0f1ef3b6d2b75e Mon Sep 17 00:00:00 2001 From: Adam Dunkels Date: Wed, 26 Aug 2015 16:47:10 +0200 Subject: [PATCH] Send a no-path DAO when becoming feather mode, so that the network can drop routes to us, which are no longer needed --- core/net/rpl/rpl.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/net/rpl/rpl.c b/core/net/rpl/rpl.c index dc66528d3..e4724408e 100644 --- a/core/net/rpl/rpl.c +++ b/core/net/rpl/rpl.c @@ -89,11 +89,17 @@ rpl_set_mode(enum rpl_mode m) } else if(m == RPL_MODE_FEATHER) { PRINTF("RPL: switching to feather mode\n"); - mode = m; if(default_instance != NULL) { + PRINTF("rpl_set_mode: RPL sending DAO with zero lifetime\n"); + if(default_instance->current_dag != NULL) { + dao_output(default_instance->current_dag->preferred_parent, RPL_ZERO_LIFETIME); + } rpl_cancel_dao(default_instance); + } else { + PRINTF("rpl_set_mode: no default instance\n"); } + mode = m; } else { mode = m; }