[riot-notifications] [RIOT-OS/RIOT] dhcpv6_client: refactor to use `event_timeout` for non-sock timeouts (#16668)

Karl Fessel notifications at github.com
Thu Jul 22 22:27:43 CEST 2021


@kfessel commented on this pull request.



> +#if IS_USED(MODULE_EVENT_TIMEOUT_ZTIMER)
+    event_timeout_ztimer_init(timeout, ZTIMER_SEC, event_queue, event);
+    event_timeout_set(timeout, delay_sec);
+#else
+    event_timeout_init(timeout, event_queue, event);
+    /* use xtimer_set64 instead of event_timeout_set to prevent overflows */
+    xtimer_set64(&timeout->timer, ((uint64_t)delay_sec) * US_PER_SEC);
+#endif

This may still be problematic since gnrc_dhcp `dhcpv6_client_conf_prefix` and nib `_nib_pl_add` have a max addr lifetime of uint32_max-1 msecs or infite
which will make the addr last shorter that its T1 and T2 timeout

-- 
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/16668#discussion_r675139489
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210722/ffa06c74/attachment.htm>


More information about the notifications mailing list