It would seem that the last_request is also updated on timed out renew/rebind, 
so need to rework this patch.
________________________________________
From: connman [connman-boun...@connman.net] on behalf of pasi.sjoh...@jolla.com 
[pasi.sjoh...@jolla.com]
Sent: Thursday, September 11, 2014 01:03
To: connman@connman.net
Subject: [PATCH 2/2] dhcpv6: Reset last_request to current time with renew and 
rebind

From: Pasi Sjöholm <pasi.sjoh...@jollamobile.com>

last_request needs to be set current time also with renew and
rebind or otherwise the values set by
g_dhcpv6_client_get_timeouts will not be changed.

This fixes the issues with __connman_dhcpv6_start_renew and
check_restart comparing incorrect started,expired-values to current
time after successful renew/rebind.
---
 src/dhcpv6.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 00dba3a..96bfb38 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -1119,6 +1119,7 @@ static void rebind_cb(GDHCPClient *dhcp_client, gpointer 
user_data)
 {
        DBG("");

+       g_dhcpv6_client_reset_request(dhcp_client);
        g_dhcpv6_client_clear_retransmit(dhcp_client);

        re_cb(REQ_REBIND, dhcp_client, user_data);
@@ -1306,6 +1307,7 @@ static void renew_cb(GDHCPClient *dhcp_client, gpointer 
user_data)
 {
        DBG("");

+       g_dhcpv6_client_reset_request(dhcp_client);
        g_dhcpv6_client_clear_retransmit(dhcp_client);

        re_cb(REQ_RENEW, dhcp_client, user_data);
--
1.9.1

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

Reply via email to