Commit e37da94d authored by Steven Bennetts's avatar Steven Bennetts Committed by Commit Bot

Settings: Internet; Ensure that IPConfigProperties.type is set

Shill is not providing a type for VPN IP Configs so we need to set it
to IPv4 so that OncMojo.getIPConfigForType() finds it correctly.

Bug: 1011557
Change-Id: I13431e0c1a352cf2456832fa97ad0d088c61667b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1865470Reviewed-by: default avatarToni Baržić <tbarzic@chromium.org>
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#706615}
parent 9c1edd8a
...@@ -740,6 +740,9 @@ mojom::IPConfigPropertiesPtr GetIPConfig(const base::Value* dict) { ...@@ -740,6 +740,9 @@ mojom::IPConfigPropertiesPtr GetIPConfig(const base::Value* dict) {
GetStringList(dict, ::onc::ipconfig::kSearchDomains); GetStringList(dict, ::onc::ipconfig::kSearchDomains);
ip_config->routing_prefix = GetInt32(dict, ::onc::ipconfig::kRoutingPrefix); ip_config->routing_prefix = GetInt32(dict, ::onc::ipconfig::kRoutingPrefix);
ip_config->type = GetString(dict, ::onc::ipconfig::kType); ip_config->type = GetString(dict, ::onc::ipconfig::kType);
// Shill may omit the IP Config type for VPNs. The type should be IPv4.
if (!ip_config->type || ip_config->type->empty())
ip_config->type = ::onc::ipconfig::kIPv4;
ip_config->web_proxy_auto_discovery_url = ip_config->web_proxy_auto_discovery_url =
GetString(dict, ::onc::ipconfig::kWebProxyAutoDiscoveryUrl); GetString(dict, ::onc::ipconfig::kWebProxyAutoDiscoveryUrl);
return ip_config; return ip_config;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment