summaryrefslogtreecommitdiff
path: root/src/dhcp.c
diff options
context:
space:
mode:
authorNiraj Kumar Goit <niraj.g@samsung.com>2019-09-23 15:45:33 +0530
committerNiraj Kumar Goit <niraj.g@samsung.com>2019-09-23 17:08:24 +0530
commita0c29c7da07fa8bf3e8839a4a64a183a02296a32 (patch)
tree6e92a0c4a208e00c275ee546b485e12c6575c145 /src/dhcp.c
parent83d8c81d27d65f9d4a3bdc3c3685d4b03a13ab70 (diff)
downloadconnman-a0c29c7da07fa8bf3e8839a4a64a183a02296a32.tar.gz
connman-a0c29c7da07fa8bf3e8839a4a64a183a02296a32.tar.bz2
connman-a0c29c7da07fa8bf3e8839a4a64a183a02296a32.zip
Added support to enable/disable Auto-IP option using main.conf Change-Id: Iea1cae5a28681a90a5f79735c7374791a227feb7 Signed-off-by: Niraj Kumar Goit <niraj.g@samsung.com>
Diffstat (limited to 'src/dhcp.c')
-rw-r--r--src/dhcp.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dhcp.c b/src/dhcp.c
index 16f59b74..951836fd 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -284,6 +284,14 @@ static void no_lease_cb(GDHCPClient *dhcp_client, gpointer user_data)
DBG("No lease available ipv4ll %d client %p", dhcp->ipv4ll_running,
dhcp->ipv4ll_client);
+#if defined TIZEN_EXT
+ if (connman_setting_get_bool("EnableAutoIp") == false) {
+ DBG("link-local address autoconfiguration is disabled.");
+ if (dhcp->network)
+ __connman_network_disconnect(dhcp->network);
+ return;
+ }
+#endif
if (dhcp->timeout > 0)
g_source_remove(dhcp->timeout);