[riot-notifications] [RIOT-OS/RIOT] sys/net/dhcpv6: Refactor IA_NA implementation (#16724)

Jan Romann notifications at github.com
Wed Aug 11 17:34:32 CEST 2021


@JKRhb commented on this pull request.



> +        server.t1 = lease_t1;
+        t2 = lease_t2;
+        _schedule_t2();
+    }
+}
+
+static void _update_addr_lease(const dhcpv6_opt_iaaddr_t *iaaddr, addr_lease_t *lease) {
+    if (iaaddr != NULL) {
+        uint32_t valid = byteorder_ntohl(iaaddr->valid);
+        uint32_t pref = byteorder_ntohl(iaaddr->pref);
+
+        lease->leased = 1U;
+        memcpy(&lease->addr, &iaaddr->addr, sizeof(ipv6_addr_t));
+        dhcpv6_client_conf_prefix(
+                lease->parent.ia_id.info.netif, &lease->addr,
+                128, valid, pref

Oh, very good, thank you!

-- 
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/16724#discussion_r686946812
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210811/da16c59f/attachment.htm>


More information about the notifications mailing list