ipconfig: Enable ipconfig if loading autoconfigurable IPv6 config
authorJukka Rissanen <jukka.rissanen@nokia.com>
Thu, 10 Feb 2011 15:52:20 +0000 (17:52 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Fri, 11 Feb 2011 11:27:18 +0000 (12:27 +0100)
src/ipconfig.c

index 0627b5b..1fb8281 100644 (file)
@@ -1782,8 +1782,21 @@ int __connman_ipconfig_load(struct connman_ipconfig *ipconfig,
                if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_OFF)
                        disable_ipv6(ipconfig);
                else if (ipconfig->method == CONNMAN_IPCONFIG_METHOD_AUTO ||
-                       ipconfig->method == CONNMAN_IPCONFIG_METHOD_MANUAL)
+                       ipconfig->method == CONNMAN_IPCONFIG_METHOD_MANUAL) {
                        enable_ipv6(ipconfig);
+                       __connman_ipconfig_enable(ipconfig);
+
+                       if (ipconfig->ops_data) {
+                               struct connman_service *service =
+                                                       ipconfig->ops_data;
+                               struct connman_network *network;
+                               network = __connman_service_get_network(
+                                                               service);
+                               if (network)
+                                       __connman_network_set_ipconfig(network,
+                                                       NULL, ipconfig);
+                       }
+               }
        }
 
        g_free(method);