mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
Merge pull request #3917 from OlegHahm/6lbr_rtr_sol_adv_fixes
6lowpan: some border router fixes
This commit is contained in:
commit
c006381fd8
@ -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 */
|
||||
|
@ -51,9 +51,13 @@ void gnrc_sixlowpan_nd_init(gnrc_ipv6_netif_t *iface)
|
||||
iface->rtr_sol_count = 0; /* first will be sent immediately */
|
||||
|
||||
DEBUG("6lo nd: retransmit multicast rtr sol in 10 sec\n");
|
||||
#ifndef MODULE_GNRC_SIXLOWPAN_ND_BORDER_ROUTER
|
||||
_rtr_sol_reschedule(iface, GNRC_SIXLOWPAN_ND_RTR_SOL_INT);
|
||||
#endif
|
||||
mutex_unlock(&iface->mutex);
|
||||
#ifndef MODULE_GNRC_SIXLOWPAN_ND_BORDER_ROUTER
|
||||
gnrc_ndp_internal_send_rtr_sol(iface->pid, NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
void gnrc_sixlowpan_nd_mc_rtr_sol(gnrc_ipv6_netif_t *iface)
|
||||
|
Loading…
Reference in New Issue
Block a user