[riot-notifications] [RIOT-OS/RIOT] sys/net/dhcpv6: Add IA_NA support to the DHCPv6 client (#16228)

Jan Romann notifications at github.com
Mon Aug 9 20:17:08 CEST 2021


@JKRhb commented on this pull request.



> +        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));
+            if (dhcpv6_client_add_addr(lease->parent.ia_id.info.netif,
+                                        &lease->addr)) {
+                DEBUG("IP ADDRESS successfully added!\n");
+                lease->pref_until = pref;
+                lease->valid_until = valid;
+
+                _set_event_timeout_sec(&deprecate_timeout, &deprecate_addrs,
+                                        pref);
+                _set_event_timeout_sec(&remove_timeout, &remove_addrs,
+                                        valid);
+            }
+        }

Refactored in 2c81f7a247936c7b62f1f0d617d8a98fba03b0b4

-- 
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/16228#discussion_r685418346
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210809/82b4bcbd/attachment-0001.htm>


More information about the notifications mailing list