There is no technical requirement to provide the domain name. Thus,
make the domain paremeter optional.
Reported by Christian Hewitt
Upstream Patch: https://git.kernel.org/pub/scm/network/connman/connman.git/patch/?id=
82699007fa89e26206771047d8cbb7c160fd2990
Change-Id: Iac21532e3e310d67c633874a95566413beb4b3a4
Signed-off-by: Nishant Chaprana <n.chaprana@samsung.com>
VPN related parameters (M = mandatory, O = optional):
- Name: A user defined name for the VPN (M)
- Host: VPN server IP address (M)
VPN related parameters (M = mandatory, O = optional):
- Name: A user defined name for the VPN (M)
- Host: VPN server IP address (M)
-- Domain: Domain name for the VPN service (M)
+- Domain: Domain name for the VPN service (O)
- Networks: The networks behind the VPN link can be defined here. This can
be missing if all traffic should go via VPN tunnel. If there are more
than one network, then separate them by comma. Format of the entry
- Networks: The networks behind the VPN link can be defined here. This can
be missing if all traffic should go via VPN tunnel. If there are more
than one network, then separate them by comma. Format of the entry
host = get_string(config_provider, "Host");
domain = get_string(config_provider, "Domain");
#if !defined TIZEN_EXT
host = get_string(config_provider, "Host");
domain = get_string(config_provider, "Domain");
#if !defined TIZEN_EXT
char *id = __vpn_provider_create_identifier(host, domain);
#else
name = get_string(config_provider, "Name");
char *id = __vpn_provider_create_identifier(host, domain);
#else
name = get_string(config_provider, "Name");
- if (host && domain && name) {
char *id = __vpn_provider_create_identifier(host, domain, name);
#endif
char *id = __vpn_provider_create_identifier(host, domain, name);
#endif
- ident = g_strdup_printf("%s_%s", host, domain);
- if (!ident)
- return NULL;
+ if (domain)
+ ident = g_strdup_printf("%s_%s", host, domain);
+ else
+ ident = g_strdup_printf("%s", host);
provider_dbus_ident(ident);
provider_dbus_ident(ident);
- ident = g_strdup_printf("%s_%s_%s", host, domain, name);
+ if (domain)
+ ident = g_strdup_printf("%s_%s_%s", host, domain, name);
+ else
+ ident = g_strdup_printf("%s_%s", host, name);
dbus_message_iter_next(&array);
}
dbus_message_iter_next(&array);
}
return -EINVAL;
DBG("Type %s name %s networks %p", type, name, networks);
return -EINVAL;
DBG("Type %s name %s networks %p", type, name, networks);
networks_str = get_string(settings, "Networks");
networks = parse_user_networks(networks_str);
networks_str = get_string(settings, "Networks");
networks = parse_user_networks(networks_str);
- if (!host || !domain) {
err = -EINVAL;
goto fail;
}
err = -EINVAL;
goto fail;
}