Chromium Code Reviews| 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..11b802fadeeba7edef3f215161b13ec07c768306 100644 |
| --- a/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| +++ b/chromeos/network/onc/onc_translator_shill_to_onc.cc |
| @@ -319,15 +319,17 @@ 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; |
| + if (shill_ip_method == shill::kTypeIPv4 || |
| + shill_ip_method == shill::kTypeDHCP) { |
| + type = ::onc::ipconfig::kIPv4; |
| + } else if (shill_ip_method == shill::kTypeIPv6 || |
| + shill_ip_method == shill::kTypeDHCP6) { |
| + type = ::onc::ipconfig::kIPv6; |
| + } else { |
| + return; // Ignore unhandled IPConfig types, e.g. bootp, zeroconf, ppp |
|
pneubeck (no reviews)
2014/05/05 21:09:28
optional nit: LOG(ERROR) maybe
stevenjb
2014/05/06 01:15:11
Not an ERROR. Shill may provide other IPConfigs th
|
| } |
| - std::string type = ::onc::ipconfig::kIPv4; |
| - if (shill_ip_method == shill::kTypeIPv6) |
| - type = ::onc::ipconfig::kIPv6; |
| onc_object_->SetStringWithoutPathExpansion(::onc::ipconfig::kType, type); |
| } |