Don't autoconfigure address on RPL Root
This commit is contained in:
parent
1549a55e42
commit
52f7e4a9f5
|
@ -522,14 +522,16 @@ rpl_set_prefix(rpl_dag_t *dag, uip_ipaddr_t *prefix, unsigned len)
|
||||||
dag->prefix_info.length = len;
|
dag->prefix_info.length = len;
|
||||||
dag->prefix_info.flags = UIP_ND6_RA_FLAG_AUTONOMOUS;
|
dag->prefix_info.flags = UIP_ND6_RA_FLAG_AUTONOMOUS;
|
||||||
PRINTF("RPL: Prefix set - will announce this in DIOs\n");
|
PRINTF("RPL: Prefix set - will announce this in DIOs\n");
|
||||||
/* Autoconfigure an address if this node does not already have an address
|
if(dag->rank != ROOT_RANK(dag->instance)) {
|
||||||
with this prefix. Otherwise, update the prefix */
|
/* Autoconfigure an address if this node does not already have an address
|
||||||
if(last_len == 0) {
|
with this prefix. Otherwise, update the prefix */
|
||||||
PRINTF("rpl_set_prefix - prefix NULL\n");
|
if(last_len == 0) {
|
||||||
check_prefix(NULL, &dag->prefix_info);
|
PRINTF("rpl_set_prefix - prefix NULL\n");
|
||||||
} else {
|
check_prefix(NULL, &dag->prefix_info);
|
||||||
PRINTF("rpl_set_prefix - prefix NON-NULL\n");
|
} else {
|
||||||
check_prefix(&last_prefix, &dag->prefix_info);
|
PRINTF("rpl_set_prefix - prefix NON-NULL\n");
|
||||||
|
check_prefix(&last_prefix, &dag->prefix_info);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue