summaryrefslogtreecommitdiff
path: root/src/ipconfig.c
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@nokia.com>2011-02-10 17:52:14 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-02-11 12:26:01 +0100
commite50d8ca9de65d8be4e4a14ab3f4484e4070c45ee (patch)
treeaeb20a0880138de4f704f7690f1755545eda0a75 /src/ipconfig.c
parent84c2a9510cb6606dcdceea55b8250e96954bfe96 (diff)
downloadconnman-e50d8ca9de65d8be4e4a14ab3f4484e4070c45ee.tar.gz
connman-e50d8ca9de65d8be4e4a14ab3f4484e4070c45ee.tar.bz2
connman-e50d8ca9de65d8be4e4a14ab3f4484e4070c45ee.zip
ipconfig: Enable or disable IPv6 when loading the saved service
Diffstat (limited to 'src/ipconfig.c')
-rw-r--r--src/ipconfig.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ipconfig.c b/src/ipconfig.c
index 4d9b30f7..0627b5bd 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -1778,6 +1778,14 @@ int __connman_ipconfig_load(struct connman_ipconfig *ipconfig,
if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_UNKNOWN)
ipconfig->method = CONNMAN_IPCONFIG_METHOD_OFF;
+ if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV6) {
+ if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_OFF)
+ disable_ipv6(ipconfig);
+ else if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_AUTO ||
+ ipconfig->method == CONNMAN_IPCONFIG_METHOD_MANUAL)
+ enable_ipv6(ipconfig);
+ }
+
g_free(method);
g_free(key);