summaryrefslogtreecommitdiff
path: root/src/dhcpv6.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2012-01-18 15:25:02 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-20 01:35:24 +0100
commitf8f7395d9c6e113e622f52dcaf9d66932c716e77 (patch)
tree237a714c37b558298603b5fe9e5d1fa2a3ee9c45 /src/dhcpv6.c
parent01f1e8e974a35cfb52da0d691c8273c44b6d8e25 (diff)
downloadconnman-f8f7395d9c6e113e622f52dcaf9d66932c716e77.tar.gz
connman-f8f7395d9c6e113e622f52dcaf9d66932c716e77.tar.bz2
connman-f8f7395d9c6e113e622f52dcaf9d66932c716e77.zip
dhcpv6: Do not start release if we are not connected
We do not need to start the RELEASE procedure if we have not yet contacted the server.
Diffstat (limited to 'src/dhcpv6.c')
-rw-r--r--src/dhcpv6.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index e6290665..aab58686 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -888,6 +888,16 @@ int __connman_dhcpv6_start_release(struct connman_network *network,
}
dhcp_client = dhcp->dhcp_client;
+ if (dhcp_client == NULL) {
+ /*
+ * We had started the DHCPv6 handshaking i.e., we have called
+ * __connman_dhcpv6_start() but it has not yet sent
+ * a solicitation message to server. This means that we do not
+ * have DHCPv6 configured yet so we can just quit here.
+ */
+ DBG("DHCPv6 was not started");
+ return 0;
+ }
g_dhcp_client_clear_requests(dhcp_client);
g_dhcp_client_clear_values(dhcp_client);