Index: chromeos/network/onc/onc_translator_shill_to_onc.cc |
diff --git a/chromeos/network/onc/onc_translator_shill_to_onc.cc b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
index 168f0b14597c546d847a2d6b4000dc03efde43b1..900ec21c705bea688f1b62e4d85b3d1888de5303 100644 |
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc |
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
@@ -477,6 +477,12 @@ void ShillToONCTranslator::TranslateSavedOrStaticIPConfig( |
onc_object_->SetWithoutPathExpansion(::onc::ipconfig::kNameServers, |
onc_nameservers.release()); |
} |
+ // Static and Saved IPConfig in Shill are always of type IPv4. Set this type |
+ // in ONC, but not if the object would be empty except the type. |
+ if (!onc_object_->empty()) { |
+ onc_object_->SetStringWithoutPathExpansion(::onc::ipconfig::kType, |
+ ::onc::ipconfig::kIPv4); |
+ } |
} |
void ShillToONCTranslator::TranslateSavedIPConfig() { |