1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

6lowpan: 6LBR should sent only one rtr adv

On a 6lo interface the border router should only send one router advertisement with its new address as source address.
This commit is contained in:
Oleg Hahm 2015-09-21 19:15:07 +02:00
parent 4b6626f8b2
commit 38b384c713

View File

@ -109,16 +109,19 @@ static ipv6_addr_t *_add_addr_to_entry(gnrc_ipv6_netif_t *entry, const ipv6_addr
if ((entry->flags & GNRC_IPV6_NETIF_FLAGS_ROUTER) &&
(entry->flags & GNRC_IPV6_NETIF_FLAGS_RTR_ADV)) {
mutex_unlock(&entry->mutex); /* function below relocks mutex */
#ifdef 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
#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);
#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);
if (!(entry->flags & GNRC_IPV6_NETIF_FLAGS_SIXLOWPAN)) {
entry->rtr_adv_count = GNRC_NDP_MAX_INIT_RTR_ADV_NUMOF;
gnrc_ndp_router_retrans_rtr_adv(entry);
}
#endif
mutex_lock(&entry->mutex); /* relock mutex */