[riot-notifications] [RIOT-OS/RIOT] sys/net/dhcpv6: include RIO after configuring downstream subnets (#16590)

Martine Lenders notifications at github.com
Thu Aug 12 14:31:31 CEST 2021


@miri64 commented on this pull request.

Here are my proposals to address https://github.com/RIOT-OS/RIOT/pull/16590#issuecomment-891297182

> +void dhcpv6_client_conf_prefix_done(unsigned iface)
+{
+    gnrc_netif_t *netif = gnrc_netif_get_by_pid(iface);
+
+    /* start advertising subnet obtained via DHCPv6 */
+    gnrc_ipv6_nib_change_rtr_adv_iface(netif, true);
+}

Move this to `sys/net/gnrc/application_layer/dhcpv6/client.c`

> @@ -113,6 +104,28 @@ static void _configure_dhcpv6_client(void)
     }
 }
 
+void dhcpv6_client_conf_done(unsigned iface)
+{
+    gnrc_netif_t *netif = gnrc_netif_get_by_pid(iface);
+
+    /* Disable router advertisements on upstream interface. With this, the border
+     * router
+     * 1. Does not confuse the upstream router to add the border router to its
+     *    default router list and
+     * 2. Solicits upstream Router Advertisements quicker to auto-configure its
+     *    upstream global address.
+     */
+    gnrc_ipv6_nib_change_rtr_adv_iface(netif, false);

Move this to `gnrc_border_router` example.

> @@ -903,6 +928,8 @@ static void _request_renew_rebind(uint8_t type)
         if (!_parse_reply(recv_buf, res)) {
             /* try again */
             event_post(event_queue, &request);
+        } else {
+            dhcpv6_client_conf_done(local.netif);

Call this function in `uhcpc` as well (maybe rename it first ;-)).

> +__attribute__ ((weak))
+void dhcpv6_client_conf_prefix_done(unsigned iface)
+{
+    (void)iface;
+}

And remove this weak definition.

> +__attribute__ ((weak))
+void dhcpv6_client_conf_done(unsigned iface)
+{
+    (void)iface;
+}

I guess this needs to moved somewhere else anywhere.

-- 
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/16590#pullrequestreview-728535534
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210812/355d26e2/attachment-0001.htm>


More information about the notifications mailing list