Index: chromeos/network/onc/onc_translator_onc_to_shill.cc |
diff --git a/chromeos/network/onc/onc_translator_onc_to_shill.cc b/chromeos/network/onc/onc_translator_onc_to_shill.cc |
index 8e30af55446f6889b6c35922c488bf602039aae8..05b746fdffe52065ce0038cf8f656384ff0d78d1 100644 |
--- a/chromeos/network/onc/onc_translator_onc_to_shill.cc |
+++ b/chromeos/network/onc/onc_translator_onc_to_shill.cc |
@@ -257,6 +257,17 @@ void LocalTranslator::TranslateNetworkConfiguration() { |
if (type == ::onc::network_type::kVPN) |
CopyFieldFromONCToShill(::onc::network_config::kName, shill::kNameProperty); |
+ std::string ipconfig_type; |
+ onc_object_->GetStringWithoutPathExpansion( |
+ ::onc::network_config::kIPConfigType, &ipconfig_type); |
+ |
+ if (ipconfig_type == ::onc::network_config::kIPConfigTypeDHCP) { |
+ // Clear the properties of StaticIPConfig. |
+ shill_dictionary_->SetWithoutPathExpansion(shill::kStaticIPConfigProperty, |
+ base::Value::CreateNullValue()); |
+ } |
+ // Otherwise, the StaticIPConfig is set and translated. |
+ |
CopyFieldsAccordingToSignature(); |
} |