Modified to provide ip type information properly. 43/261343/1 accepted/tizen/unified/20210720.123512 submit/tizen/20210719.021504
authorJaehyun Kim <jeik01.kim@samsung.com>
Thu, 15 Jul 2021 12:10:12 +0000 (21:10 +0900)
committerJaehyun Kim <jeik01.kim@samsung.com>
Thu, 15 Jul 2021 12:10:12 +0000 (21:10 +0900)
Change-Id: I91486790696939be467790f8e8dde05773aec672
Signed-off-by: Jaehyun Kim <jeik01.kim@samsung.com>
src/network-profile-intf.c

index ceecc01..7748670 100755 (executable)
@@ -917,6 +917,8 @@ static void __net_extract_ipv4_value(GVariant *variant, net_dev_info_t *net_info
 
                        if (g_strcmp0(value, "dhcp") == 0)
                                net_info->ip_config_type = NET_IP_CONFIG_TYPE_DYNAMIC;
+                       else if (g_strcmp0(value, "auto") == 0)
+                               net_info->ip_config_type = NET_IP_CONFIG_TYPE_AUTO_IP;
                        else if (g_strcmp0(value, "manual") == 0)
                                net_info->ip_config_type = NET_IP_CONFIG_TYPE_STATIC;
                        else if (g_strcmp0(value, "fixed") == 0)
@@ -975,6 +977,8 @@ static void __net_extract_ipv4_configuration_value(GVariant *variant, net_dev_in
 
                                if (g_strcmp0(value, "dhcp") == 0)
                                        net_info->ip_config_type = NET_IP_CONFIG_TYPE_DYNAMIC;
+                               else if (g_strcmp0(value, "auto") == 0)
+                                       net_info->ip_config_type = NET_IP_CONFIG_TYPE_AUTO_IP;
                                else if (g_strcmp0(value, "manual") == 0)
                                        net_info->ip_config_type = NET_IP_CONFIG_TYPE_STATIC;
                                else if (g_strcmp0(value, "fixed") == 0)
@@ -1020,8 +1024,9 @@ static void __net_extract_ipv6_value(GVariant *variant, net_dev_info_t *net_info
                                net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_STATIC;
                        else if (g_strcmp0(value, "off") == 0)
                                net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_OFF;
-                       else if (g_strcmp0(value, "auto") == 0)
-                               net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_AUTO_IP;
+                       else if (g_strcmp0(value, "auto") == 0 ||
+                                       g_strcmp0(value, "6to4") == 0)
+                               net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_DYNAMIC;
 
                } else if (g_strcmp0(subKey, "Address") == 0) {
                        value = g_variant_get_string(var, NULL);
@@ -1059,8 +1064,9 @@ static void __net_extract_ipv6_configuration_value(GVariant *variant, net_dev_in
                                net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_STATIC;
                        else if (g_strcmp0(value, "off") == 0)
                                net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_OFF;
-                       else if (g_strcmp0(value, "auto") == 0)
-                               net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_AUTO_IP;
+                       else if (g_strcmp0(value, "auto") == 0 ||
+                                       g_strcmp0(value, "6to4") == 0)
+                               net_info->ip_config_type6 = NET_IP_CONFIG_TYPE_DYNAMIC;
 
                } else if (g_strcmp0(subKey, "Address") == 0) {
                        value = g_variant_get_string(var, NULL);