[riot-notifications] [RIOT] 6lowpan nd: router fixes (#3839)

Cenk Gündoğan notifications at github.com
Mon Sep 14 21:51:04 CEST 2015


> @@ -56,6 +56,22 @@ void gnrc_sixlowpan_nd_init(gnrc_ipv6_netif_t *iface)
>      gnrc_ndp_internal_send_rtr_sol(iface->pid, NULL);
>  }
>  
> +void gnrc_sixlowpan_nd_router_set_rtr_adv(gnrc_ipv6_netif_t *netif, bool enable)
> +{
> +    ipv6_addr_t all_routers = IPV6_ADDR_ALL_ROUTERS_LINK_LOCAL;
> +
> +    if (enable) {
> +        netif->flags |= GNRC_IPV6_NETIF_FLAGS_RTR_ADV;
> +        gnrc_ipv6_netif_add_addr(netif->pid, &all_routers, 128,

Maybe you should at first check the return value of `gnrc_ipv6_netif_add_addr`, before you set the `netif->flags` in case there is no space left to add a new ip address..

---
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/3839/files#r39438435
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20150914/ffc4156f/attachment.html>


More information about the notifications mailing list