diff --git a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c index 06c053f8198c55c20ec39d9f410a005f6303f9b1..09ea6d5af9fc652f5afc1a94355692322a32ccc7 100644 --- a/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c +++ b/sys/net/gnrc/network_layer/ipv6/netif/gnrc_ipv6_netif.c @@ -105,15 +105,22 @@ static ipv6_addr_t *_add_addr_to_entry(gnrc_ipv6_netif_t *entry, const ipv6_addr } else { if (!ipv6_addr_is_link_local(addr)) { -#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) */ +#if defined(MODULE_GNRC_NDP_ROUTER) || defined(MODULE_GNRC_SIXLOWPAN_ND_ROUTER) if ((entry->flags & GNRC_IPV6_NETIF_FLAGS_ROUTER) && (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 */ +#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); + } +#endif mutex_lock(&entry->mutex); /* relock mutex */ } #endif diff --git a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c index 18d9893ed0c91b336fcb12f679118d408ae3e2bd..31068f361f7850317f896f16c2bb06614d021cfd 100644 --- a/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c +++ b/sys/net/gnrc/network_layer/ndp/gnrc_ndp.c @@ -619,6 +619,9 @@ void gnrc_ndp_rtr_adv_handle(kernel_pid_t iface, gnrc_pktsnip_t *pkt, ipv6_hdr_t gnrc_sixlowpan_nd_rtr_sol_reschedule(nc_entry, next_rtr_sol); gnrc_ndp_internal_send_nbr_sol(nc_entry->iface, NULL, &nc_entry->ipv6_addr, &nc_entry->ipv6_addr); + if (if_entry->flags & GNRC_IPV6_NETIF_FLAGS_ROUTER) { + gnrc_ipv6_netif_set_rtr_adv(if_entry, true); + } } #endif }