Remove obsolete support for broadcast DAOs.
This commit is contained in:
parent
ed37e983f6
commit
6071b5aee7
@ -701,26 +701,17 @@ dao_output(rpl_parent_t *n, uint8_t lifetime)
|
|||||||
rpl_instance_t *instance;
|
rpl_instance_t *instance;
|
||||||
unsigned char *buffer;
|
unsigned char *buffer;
|
||||||
uint8_t prefixlen;
|
uint8_t prefixlen;
|
||||||
uip_ipaddr_t addr;
|
|
||||||
uip_ipaddr_t prefix;
|
uip_ipaddr_t prefix;
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
/* Destination Advertisement Object */
|
/* Destination Advertisement Object */
|
||||||
|
|
||||||
if(get_global_addr(&prefix) == 0) {
|
if(get_global_addr(&prefix) == 0) {
|
||||||
PRINTF("RPL: No global address set for this node - suppressing DAO\n");
|
PRINTF("RPL: No global address set for this node - suppressing DAO\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(n == NULL) {
|
dag = n->dag;
|
||||||
dag = rpl_get_any_dag();
|
|
||||||
if(dag == NULL) {
|
|
||||||
PRINTF("RPL: Did not join a DAG before sending DAO\n");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
dag = n->dag;
|
|
||||||
}
|
|
||||||
|
|
||||||
instance = dag->instance;
|
instance = dag->instance;
|
||||||
|
|
||||||
#ifdef RPL_DEBUG_DAO_OUTPUT
|
#ifdef RPL_DEBUG_DAO_OUTPUT
|
||||||
@ -765,23 +756,13 @@ dao_output(rpl_parent_t *n, uint8_t lifetime)
|
|||||||
buffer[pos++] = 0; /* path seq - ignored */
|
buffer[pos++] = 0; /* path seq - ignored */
|
||||||
buffer[pos++] = lifetime;
|
buffer[pos++] = lifetime;
|
||||||
|
|
||||||
if(n == NULL) {
|
|
||||||
uip_create_linklocal_rplnodes_mcast(&addr);
|
|
||||||
} else {
|
|
||||||
uip_ipaddr_copy(&addr, &n->addr);
|
|
||||||
}
|
|
||||||
|
|
||||||
PRINTF("RPL: Sending DAO with prefix ");
|
PRINTF("RPL: Sending DAO with prefix ");
|
||||||
PRINT6ADDR(&prefix);
|
PRINT6ADDR(&prefix);
|
||||||
PRINTF(" to ");
|
PRINTF(" to ");
|
||||||
if(n != NULL) {
|
PRINT6ADDR(&n->addr);
|
||||||
PRINT6ADDR(&n->addr);
|
|
||||||
} else {
|
|
||||||
PRINTF("multicast address");
|
|
||||||
}
|
|
||||||
PRINTF("\n");
|
PRINTF("\n");
|
||||||
|
|
||||||
uip_icmp6_send(&addr, ICMP6_RPL, RPL_CODE_DAO, pos);
|
uip_icmp6_send(&n->addr, ICMP6_RPL, RPL_CODE_DAO, pos);
|
||||||
}
|
}
|
||||||
/*---------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------*/
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user