return ipdevice->pac;
}
+static void disable_ipv6(struct connman_ipconfig *ipconfig)
+{
+ struct connman_ipdevice *ipdevice;
+
+ DBG("");
+
+ ipdevice = g_hash_table_lookup(ipdevice_hash,
+ GINT_TO_POINTER(ipconfig->index));
+ if (ipdevice == NULL)
+ return;
+
+ set_ipv6_state(ipdevice->ifname, FALSE);
+}
+
+static void enable_ipv6(struct connman_ipconfig *ipconfig)
+{
+ struct connman_ipdevice *ipdevice;
+
+ DBG("");
+
+ ipdevice = g_hash_table_lookup(ipdevice_hash,
+ GINT_TO_POINTER(ipconfig->index));
+ if (ipdevice == NULL)
+ return;
+
+ set_ipv6_state(ipdevice->ifname, TRUE);
+}
+
int __connman_ipconfig_enable(struct connman_ipconfig *ipconfig)
{
struct connman_ipdevice *ipdevice;
if (ipdevice->config_ipv6 == ipconfig)
return -EALREADY;
type = CONNMAN_IPCONFIG_TYPE_IPV6;
+ enable_ipv6(ipconfig);
} else
return -EINVAL;
if (ipdevice->config_ipv6 == ipconfig) {
ipconfig_list = g_list_remove(ipconfig_list, ipconfig);
+ if (ipdevice->config_ipv6->method ==
+ CONNMAN_IPCONFIG_METHOD_AUTO)
+ disable_ipv6(ipdevice->config_ipv6);
+
connman_ipaddress_clear(ipdevice->config_ipv6->system);
connman_ipconfig_unref(ipdevice->config_ipv6);
ipdevice->config_ipv6 = NULL;
DBUS_TYPE_STRING, &ipconfig->address->gateway);
}
-static void disable_ipv6(struct connman_ipconfig *ipconfig)
-{
- struct connman_ipdevice *ipdevice;
-
- DBG("");
-
- ipdevice = g_hash_table_lookup(ipdevice_hash,
- GINT_TO_POINTER(ipconfig->index));
- if (ipdevice == NULL)
- return;
-
- set_ipv6_state(ipdevice->ifname, FALSE);
-}
-
-static void enable_ipv6(struct connman_ipconfig *ipconfig)
-{
- struct connman_ipdevice *ipdevice;
-
- DBG("");
-
- ipdevice = g_hash_table_lookup(ipdevice_hash,
- GINT_TO_POINTER(ipconfig->index));
- if (ipdevice == NULL)
- return;
-
- set_ipv6_state(ipdevice->ifname, TRUE);
-}
-
int __connman_ipconfig_set_config(struct connman_ipconfig *ipconfig,
DBusMessageIter *array)
{