summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-04-26 09:51:31 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-26 13:06:24 +0300
commit28e7946111f347cd22f1c872fff66c3725ea3583 (patch)
tree59caff67b24625b365169aac4a2c77b65aa970f3 /src
parent97987e6b3887958df0ce784486c91d0736aeaef7 (diff)
downloadconnman-28e7946111f347cd22f1c872fff66c3725ea3583.tar.gz
connman-28e7946111f347cd22f1c872fff66c3725ea3583.tar.bz2
connman-28e7946111f347cd22f1c872fff66c3725ea3583.zip
dhcpv6: Retransmit a message with same transaction id
Make sure we do not create a new transaction id for a message when it needs to be retransmitted.
Diffstat (limited to 'src')
-rw-r--r--src/dhcpv6.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 1d724e51..7315c394 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -271,6 +271,8 @@ static void info_req_cb(GDHCPClient *dhcp_client, gpointer user_data)
return;
}
+ g_dhcpv6_client_clear_retransmit(dhcp_client);
+
option = g_dhcp_client_get_option(dhcp_client, G_DHCPV6_DNS_SERVERS);
entries = g_list_length(option);
@@ -570,6 +572,7 @@ static void rebind_cb(GDHCPClient *dhcp_client, gpointer user_data)
g_dhcpv6_client_reset_rebind(dhcp_client);
g_dhcpv6_client_reset_renew(dhcp_client);
+ g_dhcpv6_client_clear_retransmit(dhcp_client);
re_cb(dhcp_client, user_data);
}
@@ -652,6 +655,8 @@ static gboolean timeout_rebind(gpointer user_data)
dhcp->timeout = g_timeout_add(dhcp->RT, timeout_rebind, dhcp);
+ g_dhcpv6_client_set_retransmit(dhcp->dhcp_client);
+
g_dhcp_client_start(dhcp->dhcp_client, NULL);
return FALSE;
@@ -676,6 +681,8 @@ static void request_cb(GDHCPClient *dhcp_client, gpointer user_data)
{
DBG("");
+ g_dhcpv6_client_clear_retransmit(dhcp_client);
+
re_cb(dhcp_client, user_data);
}
@@ -733,6 +740,8 @@ static gboolean timeout_request(gpointer user_data)
DBG("request RT timeout %d msec", dhcp->RT);
dhcp->timeout = g_timeout_add(dhcp->RT, timeout_request, dhcp);
+ g_dhcpv6_client_set_retransmit(dhcp->dhcp_client);
+
g_dhcp_client_start(dhcp->dhcp_client, NULL);
return FALSE;
@@ -743,6 +752,7 @@ static void renew_cb(GDHCPClient *dhcp_client, gpointer user_data)
DBG("");
g_dhcpv6_client_reset_renew(dhcp_client);
+ g_dhcpv6_client_clear_retransmit(dhcp_client);
re_cb(dhcp_client, user_data);
}
@@ -795,6 +805,8 @@ static gboolean timeout_renew(gpointer user_data)
dhcp->timeout = g_timeout_add(dhcp->RT, timeout_renew, dhcp);
+ g_dhcpv6_client_set_retransmit(dhcp->dhcp_client);
+
g_dhcp_client_start(dhcp->dhcp_client, NULL);
return FALSE;
@@ -979,6 +991,8 @@ static gboolean timeout_info_req(gpointer user_data)
dhcp->timeout = g_timeout_add(dhcp->RT, timeout_info_req, dhcp);
+ g_dhcpv6_client_set_retransmit(dhcp->dhcp_client);
+
g_dhcp_client_start(dhcp->dhcp_client, NULL);
return FALSE;
@@ -1045,6 +1059,8 @@ static void advertise_cb(GDHCPClient *dhcp_client, gpointer user_data)
clear_timer(dhcp);
+ g_dhcpv6_client_clear_retransmit(dhcp_client);
+
if (g_dhcpv6_client_get_status(dhcp_client) != 0) {
if (dhcp->callback != NULL)
dhcp->callback(dhcp->network, FALSE);
@@ -1070,6 +1086,8 @@ static void solicitation_cb(GDHCPClient *dhcp_client, gpointer user_data)
clear_timer(dhcp);
set_addresses(dhcp_client, dhcp);
+
+ g_dhcpv6_client_clear_retransmit(dhcp_client);
}
static gboolean timeout_solicitation(gpointer user_data)
@@ -1082,6 +1100,8 @@ static gboolean timeout_solicitation(gpointer user_data)
dhcp->timeout = g_timeout_add(dhcp->RT, timeout_solicitation, dhcp);
+ g_dhcpv6_client_set_retransmit(dhcp->dhcp_client);
+
g_dhcp_client_start(dhcp->dhcp_client, NULL);
return FALSE;