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

Martine Lenders notifications at github.com
Fri Jul 23 15:43:13 CEST 2021


@miri64 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)) {

A border router does not necessarily has to be a RPL root or a RPL root must not be a border router. These lines purely exist to make our `gnrc_border_router` example happy (where the border router is assumed to be a RPL root), so this should not be here, but in a 6LBR-specific module (like it is the case with DHCPv6 and with ethos somewhat, because ethos is our thing anyways).

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


More information about the notifications mailing list