#define WIFI_CONFIG_IPV6_DNS_METHOD "Nameservers.IPv6method"
#define WIFI_CONFIG_IPV4_ADDRESS "IPv4.local_address"
#define WIFI_CONFIG_IPV4_SUBNET_MASK "IPv4.netmask_prefixlen"
+#define WIFI_CONFIG_IPV6_PREFIX_LEN "IPv6.netmask_prefixlen"
#define WIFI_CONFIG_IPV4_GATEWAY_ADDRESS "IPv4.gateway"
#define WIFI_CONFIG_DNS_ADDRESS "Nameservers"
#define WIFI_CONFIG_FAILURE "Failure"
g_free(conf->ip_info->subnet_mask);
g_free(conf->ip_info->gateway_address);
g_free(conf->ip_info->dns_type);
+ conf->ip_info->prefix_length = 0;
int i = 0, count = conf->ip_info->dns_count;
while (i < count) {
if (conf->ip_info->subnet_mask != NULL)
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_IPV4_SUBNET_MASK, g_variant_new_string(conf->ip_info->subnet_mask));
+ if (conf->ip_info->prefix_length > 0)
+ g_variant_builder_add(b, "{sv}", WIFI_CONFIG_IPV6_PREFIX_LEN, g_variant_new_int32(conf->ip_info->prefix_length));
+
if (conf->ip_info->gateway_address != NULL)
g_variant_builder_add(b, "{sv}", WIFI_CONFIG_IPV4_GATEWAY_ADDRESS, g_variant_new_string(conf->ip_info->gateway_address));
} else {
conf->ip_info->subnet_mask = NULL;
}
+ } else if (g_strcmp0(field, WIFI_CONFIG_IPV6_PREFIX_LEN) == 0) {
+ if (g_variant_is_of_type(value, G_VARIANT_TYPE_INT32)) {
+ conf->ip_info->prefix_length = g_variant_get_int32(value);
+ DBG("IPv6 Prefix Length [%d]", conf->ip_info->prefix_length);
+ } else {
+ conf->ip_info->prefix_length = 0;
+ }
} else if (g_strcmp0(field, WIFI_CONFIG_IPV4_GATEWAY_ADDRESS) == 0) {
if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING)) {
conf->ip_info->gateway_address = g_strdup(g_variant_get_string(value, NULL));
WIFI_CONFIG_IPV4_SUBNET_MASK, prefix_len);
}
+ if (conf->ip_info->prefix_length > 0)
+ g_key_file_set_integer(keyfile, group_name,
+ WIFI_CONFIG_IPV6_PREFIX_LEN, conf->ip_info->prefix_length);
+
if (conf->ip_info->gateway_address != NULL)
g_key_file_set_string(keyfile, group_name,
WIFI_CONFIG_IPV4_GATEWAY_ADDRESS, conf->ip_info->gateway_address);