[riot-notifications] [RIOT-OS/RIOT] net/gnrc/ipv6: move gnrc_util_conf_prefix() to common code (#16672)

benpicco notifications at github.com
Fri Jul 23 18:01:28 CEST 2021


@benpicco commented on this pull request.



> +        if (pref < UINT32_MAX) { /* UINT32_MAX means infinite lifetime */
+            /* same treatment for pref */
+            pref = (pref > (UINT32_MAX / MS_PER_SEC)) ?
+                         (UINT32_MAX - 1) : pref * MS_PER_SEC;
+        }
+        gnrc_ipv6_nib_pl_set(netif->pid, pfx, pfx_len, valid, pref);
+        if (IS_USED(MODULE_GNRC_IPV6_NIB) &&
+            IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR) &&
+            IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C) &&
+            gnrc_netif_is_6ln(netif)) {
+            if (IS_USED(MODULE_GNRC_SIXLOWPAN_CTX)) {
+                _update_6ctx(pfx, pfx_len, valid);
+            }
+            (void)gnrc_ipv6_nib_abr_add(&addr);
+        }
+        if (IS_USED(MODULE_GNRC_RPL)) {

Should I make a separate helper function for RPL then? This is after all already duplicated in both `gnrc_uhcpc.c` and `dhcpv6/client.c`. 

-- 
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/16672#discussion_r675673872
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210723/b4d419da/attachment.htm>


More information about the notifications mailing list