Merge pull request #299 from jdede/rpl-rm-neighbor

Default route not removed
This commit is contained in:
Adam Dunkels 2013-07-26 03:52:55 -07:00
commit 9ba5d9694c
1 changed files with 3 additions and 1 deletions

View File

@ -703,7 +703,9 @@ rpl_remove_parent(rpl_dag_t *dag, rpl_parent_t *parent)
void
rpl_nullify_parent(rpl_dag_t *dag, rpl_parent_t *parent)
{
if(parent == dag->preferred_parent) {
/* This function can be called when the preferred parent is NULL, so we
need to handle this condition in order to trigger uip_ds6_defrt_rm. */
if(parent == dag->preferred_parent || dag->preferred_parent == NULL) {
dag->preferred_parent = NULL;
dag->rank = INFINITE_RANK;
if(dag->joined) {