6lowpan nd: send rtr adv on new address
This commit is contained in:
parent
9641f8c39c
commit
6f2d90a95c
@ -105,15 +105,22 @@ static ipv6_addr_t *_add_addr_to_entry(gnrc_ipv6_netif_t *entry, const ipv6_addr
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (!ipv6_addr_is_link_local(addr)) {
|
if (!ipv6_addr_is_link_local(addr)) {
|
||||||
#ifdef MODULE_GNRC_NDP_ROUTER
|
#if defined(MODULE_GNRC_NDP_ROUTER) || defined(MODULE_GNRC_SIXLOWPAN_ND_ROUTER)
|
||||||
/* New prefixes MAY allow the router to retransmit up to
|
|
||||||
* GNRC_NDP_MAX_INIT_RTR_ADV_NUMOF unsolicited RA
|
|
||||||
* (see https://tools.ietf.org/html/rfc4861#section-6.2.4) */
|
|
||||||
if ((entry->flags & GNRC_IPV6_NETIF_FLAGS_ROUTER) &&
|
if ((entry->flags & GNRC_IPV6_NETIF_FLAGS_ROUTER) &&
|
||||||
(entry->flags & GNRC_IPV6_NETIF_FLAGS_RTR_ADV)) {
|
(entry->flags & GNRC_IPV6_NETIF_FLAGS_RTR_ADV)) {
|
||||||
entry->rtr_adv_count = GNRC_NDP_MAX_INIT_RTR_ADV_NUMOF;
|
|
||||||
mutex_unlock(&entry->mutex); /* function below relocks mutex */
|
mutex_unlock(&entry->mutex); /* function below relocks mutex */
|
||||||
|
#ifdef MODULE_GNRC_NDP_ROUTER
|
||||||
|
/* New prefixes MAY allow the router to retransmit up to
|
||||||
|
* GNRC_NDP_MAX_INIT_RTR_ADV_NUMOF unsolicited RA
|
||||||
|
* (see https://tools.ietf.org/html/rfc4861#section-6.2.4) */
|
||||||
|
entry->rtr_adv_count = GNRC_NDP_MAX_INIT_RTR_ADV_NUMOF;
|
||||||
gnrc_ndp_router_retrans_rtr_adv(entry);
|
gnrc_ndp_router_retrans_rtr_adv(entry);
|
||||||
|
#elif defined(MODULE_GNRC_SIXLOWPAN_ND_ROUTER)
|
||||||
|
if (entry->flags & GNRC_IPV6_NETIF_FLAGS_SIXLOWPAN) {
|
||||||
|
gnrc_ndp_internal_send_rtr_adv(entry->pid, &tmp_addr->addr,
|
||||||
|
NULL, false);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
mutex_lock(&entry->mutex); /* relock mutex */
|
mutex_lock(&entry->mutex); /* relock mutex */
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user