summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-06-04 12:34:37 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-06-04 12:45:56 +0300
commit77ade69cce17c24ade7c5d99ff04841adae22156 (patch)
treee4eefc9abf656514ff0e3e6228ca71af511ea093
parent0515b2208ba32dd894603860d6571aa5d82dfe17 (diff)
downloadconnman-77ade69cce17c24ade7c5d99ff04841adae22156.tar.gz
connman-77ade69cce17c24ade7c5d99ff04841adae22156.tar.bz2
connman-77ade69cce17c24ade7c5d99ff04841adae22156.zip
dhcpv6: Make sure release message is sent
Register an empty Release callback so that the message will be sent.
-rw-r--r--src/dhcpv6.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 703bedbf..abeab0bc 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -911,6 +911,11 @@ int __connman_dhcpv6_start_renew(struct connman_network *network,
return 0;
}
+static void release_cb(GDHCPClient *dhcp_client, gpointer user_data)
+{
+ DBG("");
+}
+
int __connman_dhcpv6_start_release(struct connman_network *network,
dhcp_cb callback)
{
@@ -958,12 +963,16 @@ int __connman_dhcpv6_start_release(struct connman_network *network,
clear_callbacks(dhcp_client);
/*
- * We do not register callback here because the answer might take too
- * long time and network code might be in the middle of the disconnect.
+ * Although we register a callback here we are really not interested in
+ * the answer because it might take too long time and network code
+ * might be in the middle of the disconnect.
* So we just inform the server that we are done with the addresses
* but ignore the reply from server. This is allowed by RFC 3315
* chapter 18.1.6.
*/
+ g_dhcp_client_register_event(dhcp_client,
+ G_DHCP_CLIENT_EVENT_RELEASE,
+ release_cb, NULL);
dhcp->dhcp_client = dhcp_client;