summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartinXu <martin@review.tizen.org>2013-07-01 01:11:38 -0700
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>2013-07-01 01:11:38 -0700
commitb9fb00a2bc5b44ebea64faaa7cb186764901c977 (patch)
tree4695397d20705dc68174933037ab956b1436608f
parent6b7adbabe7269716d17a7677e5ec7e203f78ebf2 (diff)
parent5627d0d9d59bc7a5cc0830bcd9f2ab3403ba4174 (diff)
downloadconnman-accepted/tizen/20130701.201407.tar.gz
connman-accepted/tizen/20130701.201407.tar.bz2
connman-accepted/tizen/20130701.201407.zip
Merge "Tizen: Add option to disable link local address" into tizensubmit/tizen/20130701.105247submit/tizen/20130701.094310accepted/tizen/20130701.201407
-rw-r--r--configure.ac7
-rw-r--r--src/dhcp.c11
2 files changed, 18 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index ebc8170a..57b06947 100644
--- a/configure.ac
+++ b/configure.ac
@@ -377,6 +377,13 @@ if (test "${enable_wifi}" != "no"); then
$PATH:/sbin:/usr/sbin)
fi
+AC_ARG_ENABLE(linklocaladdr, AC_HELP_STRING([--disable-linklocaladdr],
+ [disable link local address when dhcp failed]), [
+ if (test "${enableval}" = "no"); then
+ CFLAGS="$CFLAGS -DDISABLE_LINK_LOCAL_ADDR"
+ fi
+])
+
AC_ARG_ENABLE(datafiles, AC_HELP_STRING([--disable-datafiles],
[don't install configuration and data files]),
[enable_datafiles=${enableval}])
diff --git a/src/dhcp.c b/src/dhcp.c
index f32bfaef..c5c14a8a 100644
--- a/src/dhcp.c
+++ b/src/dhcp.c
@@ -368,6 +368,17 @@ static void ipv4ll_available_cb(GDHCPClient *dhcp_client, gpointer user_data)
if (service == NULL)
return;
+#if defined DISABLE_LINK_LOCAL_ADDR
+ dhcp_invalidate(dhcp, TRUE);
+
+ __connman_service_ipconfig_indicate_state(service,
+ CONNMAN_SERVICE_STATE_IDLE,
+ CONNMAN_IPCONFIG_TYPE_IPV4);
+ __connman_service_ipconfig_indicate_state(service,
+ CONNMAN_SERVICE_STATE_IDLE,
+ CONNMAN_IPCONFIG_TYPE_IPV6);
+ return;
+#endif
ipconfig = __connman_service_get_ip4config(service);
if (ipconfig == NULL)
return;