If T1 or T2 are not set by the server, use the recommended default
DHCPv6 server values 0.5 and 0.8. See RFC 3315, section 22.4.

Thanks to Dan Williams for reporting this issue.
---
 src/dhcpv6.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 461b0a6..dee2d81 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -1422,11 +1422,13 @@ int __connman_dhcpv6_start_renew(struct connman_network 
*network,
                /* RFC 3315, 22.4 */
                return 0;
 
-       if (T1 == 0)
+       if (T1 == 0) {
                /* RFC 3315, 22.4
                 * Client can choose the timeout.
                 */
-               T1 = 1800;
+               T1 = (expired - started) / 2;
+               T2 = (expired - started) / 10 * 8;
+       }
 
        dhcp->callback = callback;
 
-- 
1.9.1

_______________________________________________
connman mailing list
connman@connman.net
https://lists.connman.net/mailman/listinfo/connman

Reply via email to