connman_info("rp_filter restored to %d", old_value);
}
-gboolean __connman_ipconfig_ipv6_privacy_enabled(struct connman_ipconfig *ipconfig)
-{
- if (ipconfig == NULL)
- return FALSE;
-
- return ipconfig->ipv6_privacy_config == 0 ? FALSE : TRUE;
-}
-
static void free_ipdevice(gpointer data)
{
struct connman_ipdevice *ipdevice = data;
ipconfig->ops->down(ipconfig);
}
+#if defined TIZEN_EXT
+ if (g_strcmp0(ipdevice->address, address) != 0) {
+ g_free(ipdevice->address);
+ ipdevice->address = g_strdup(address);
+ }
+#endif
+
if (lower_up)
__connman_ipconfig_lower_up(ipdevice);
if (lower_down)
if (scope == 0 && (g_strcmp0(dst, "0.0.0.0") == 0 ||
g_strcmp0(dst, "::") == 0)) {
+ GSList *list;
GList *config_list;
enum connman_ipconfig_type type;
} else
return;
+ for (list = ipdevice->address_list; list; list = list->next) {
+ struct connman_ipaddress *ipaddress = list->data;
+
+ g_free(ipaddress->gateway);
+ ipaddress->gateway = g_strdup(gateway);
+ }
+
for (config_list = g_list_first(ipconfig_list); config_list;
config_list = g_list_next(config_list)) {
struct connman_ipconfig *ipconfig = config_list->data;
if (ipconfig->ops == NULL)
continue;
- if (ipconfig->ops->route_set)
- ipconfig->ops->route_set(ipconfig);
+ if (ipconfig->ops->ip_bound)
+ ipconfig->ops->ip_bound(ipconfig);
}
}
if (scope == 0 && (g_strcmp0(dst, "0.0.0.0") == 0 ||
g_strcmp0(dst, "::") == 0)) {
+ GSList *list;
GList *config_list;
enum connman_ipconfig_type type;
} else
return;
+ for (list = ipdevice->address_list; list; list = list->next) {
+ struct connman_ipaddress *ipaddress = list->data;
+
+ g_free(ipaddress->gateway);
+ ipaddress->gateway = NULL;
+ }
+
for (config_list = g_list_first(ipconfig_list); config_list;
config_list = g_list_next(config_list)) {
struct connman_ipconfig *ipconfig = config_list->data;
if (ipconfig->ops == NULL)
continue;
- if (ipconfig->ops->route_unset)
- ipconfig->ops->route_unset(ipconfig);
+ if (ipconfig->ops->ip_release)
+ ipconfig->ops->ip_release(ipconfig);
}
}
ipconfig->address->gateway = g_strdup(gateway);
}
+#if defined TIZEN_EXT
+/*
+ * Description: __connman_service_lookup_from_index cannot find correct service
+ */
+int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig, struct connman_service *service)
+#else
int __connman_ipconfig_gateway_add(struct connman_ipconfig *ipconfig)
+#endif
{
+#if !defined TIZEN_EXT
struct connman_service *service;
+#endif
DBG("");
if (ipconfig->address == NULL)
return -EINVAL;
+#if !defined TIZEN_EXT
service = __connman_service_lookup_from_index(ipconfig->index);
+#endif
if (service == NULL)
return -EINVAL;
key = g_strdup_printf("%smethod", prefix);
method = g_key_file_get_string(keyfile, identifier, key, NULL);
if (method == NULL) {
- switch (ipconfig->type) {
- case CONNMAN_IPCONFIG_TYPE_IPV4:
+ if (ipconfig->type == CONNMAN_IPCONFIG_TYPE_IPV4)
ipconfig->method = CONNMAN_IPCONFIG_METHOD_DHCP;
- break;
- case CONNMAN_IPCONFIG_TYPE_IPV6:
- ipconfig->method = CONNMAN_IPCONFIG_METHOD_AUTO;
- break;
- case CONNMAN_IPCONFIG_TYPE_UNKNOWN:
+ else
ipconfig->method = CONNMAN_IPCONFIG_METHOD_OFF;
- break;
- }
} else
ipconfig->method = __connman_ipconfig_string2method(method);