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 7716fbf2954d2a49d065b51ce40f0b5ff11d063a..f9d73183d2459ea880eb2d588ac258f28eb4e860 100644 |
--- a/chromeos/network/onc/onc_translator_shill_to_onc.cc |
+++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
@@ -319,15 +319,18 @@ void ShillToONCTranslator::TranslateIPConfig() { |
std::string shill_ip_method; |
shill_dictionary_->GetStringWithoutPathExpansion(shill::kMethodProperty, |
&shill_ip_method); |
- if (shill_ip_method != shill::kTypeIPv4 && |
- shill_ip_method != shill::kTypeIPv6) { |
- LOG(ERROR) << "Unhandled IPConfig Method value " << shill_ip_method; |
- return; |
- } |
- |
- std::string type = ::onc::ipconfig::kIPv4; |
- if (shill_ip_method == shill::kTypeIPv6) |
+ std::string type; |
+ if (shill_ip_method == shill::kTypeIPv4) |
pneubeck (no reviews)
2014/05/02 09:57:43
Ok, I think we have a mismatch of the properties'
stevenjb
2014/05/02 17:22:34
Hm, I see, OK. We have to support multiple "IPv6"
|
+ type == ::onc::ipconfig::kIPv4; |
+ else if (shill_ip_method == shill::kTypeIPv6) |
type = ::onc::ipconfig::kIPv6; |
+ else if (shill_ip_method == shill::kTypeDHCP) |
+ type = ::onc::ipconfig::kDHCPv4; |
+ else if (shill_ip_method == shill::kTypeDHCP6) |
+ type = ::onc::ipconfig::kDHCPv6; |
+ else |
+ return; // Ignore unhandled IPConfig types, e.g. bootp, zeroconf, ppp |
+ |
onc_object_->SetStringWithoutPathExpansion(::onc::ipconfig::kType, type); |
} |