Skip to content
Snippets Groups Projects
Unverified Commit fff4f4a6 authored by Niclas Finne's avatar Niclas Finne Committed by GitHub
Browse files

Merge pull request #1666 from thielemans/rpl-classic-prefix

Fix RPL classic border router prefix
parents 06ac8d4f 5fc6eee4
No related branches found
No related tags found
No related merge requests found
...@@ -119,11 +119,9 @@ rpl_dag_root_start(void) ...@@ -119,11 +119,9 @@ rpl_dag_root_start(void)
if(root_if != NULL) { if(root_if != NULL) {
rpl_dag_t *dag; rpl_dag_t *dag;
uip_ipaddr_t prefix; uip_ipaddr_t prefix;
const uip_ipaddr_t *default_prefix;
rpl_set_root(RPL_DEFAULT_INSTANCE, ipaddr); rpl_set_root(RPL_DEFAULT_INSTANCE, ipaddr);
dag = rpl_get_any_dag(); dag = rpl_get_any_dag();
default_prefix = uip_ds6_default_prefix();
/* If there are routes in this dag, we remove them all as we are /* If there are routes in this dag, we remove them all as we are
from now on the new dag root and the old routes are wrong */ from now on the new dag root and the old routes are wrong */
...@@ -135,7 +133,7 @@ rpl_dag_root_start(void) ...@@ -135,7 +133,7 @@ rpl_dag_root_start(void)
dag->instance->def_route = NULL; dag->instance->def_route = NULL;
} }
uip_ip6addr_copy(&prefix, default_prefix); uip_ip6addr_copy(&prefix, ipaddr);
rpl_set_prefix(dag, &prefix, 64); rpl_set_prefix(dag, &prefix, 64);
LOG_INFO("root_set_prefix: created a new RPL dag\n"); LOG_INFO("root_set_prefix: created a new RPL dag\n");
return 0; return 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment