[riot-notifications] [RIOT-OS/RIOT] gnrc_dhcpv6_client_6lbr: choose downstream if as !upstream (#16530)

Martine Lenders notifications at github.com
Tue Jun 15 13:11:08 CEST 2021


> and renaming gnrc_dhcpv6_client_6lbr -> gnrc_dhcpv6_client_greedy with gnrc_dhcpv6_client_6lbr remaining as a sub-module that pulls in gnrc_dhcpv6_client_greedy (or gnrc_dhcpv6_client_router)
> ```

Mhhh from the naming this might be misleading. The 6LBR sub-module is all but greedy. How about renaming it `gnrc_dhcpv6_client_simple64pd` (for "simple 64-bit prefix delegation") and do:

```C
static void _configure_dhcpv6_client(void)
{
    gnrc_netif_t *netif = NULL;
    gnrc_netif_t *upstream = (IS_USED(MODULE_GNRC_DHCPV6_CLIENT_GREEDY))
                                         ? _find_upstream_netif() : NULL;
    while ((netif = gnrc_netif_iter(netif))) {
        if (IS_USED(MODULE_GNRC_DHCPV6_CLIENT_6LBR)
            && !gnrc_netif_is_6lo(netif)) {
            continue;
        }
        if (IS_USED(MODULE_GNRC_DHCPV6_CLIENT_GREEDY) &&
            (netif == upstream)) {
            continue;
        }
        dhcpv6_client_req_ia_pd(netif->pid, 64U);
    }
}
```

and then make both sub-modules `6lbr` and `greedy` dependent on simple64pd.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/16530#issuecomment-861408851
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210615/80cd018e/attachment-0001.htm>


More information about the notifications mailing list