commit | c5099532b82fe201fe2510c43b529944a0930d2e | [log] [tgz] |
---|---|---|
author | Paul Stewart <pstew@chromium.org> | Thu Dec 12 07:53:15 2013 -0800 |
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | Sun Dec 15 17:39:17 2013 +0000 |
tree | 0e672886580006c9110a6ffdb01f94a4d9dd29f5 | |
parent | 7a0d0f28e3098e56fe0005ccc5ebec67ab22a60e [diff] |
shill: IPConfig: Don't reset StaticIP on failure If the IP address associated with an IPConfig is provided by StaticIP, the entire configuration should be retained even if the automatic configuration method fails. Otherwise, configuration parameters provided outside of the automatic configuration mechanism will be lost. To accomplish this cleanly, we need to change the contract between IPConfig and Device objects. The failure and success events are now split into separate callbacks. Intead of passing a bool parameter to OnIPConfigUpdated, failure cases are handled by a separate method. Further, there is no expectation in the failure case that the IPConfig resets itself, so the IPConfig provides a public method for the Device to call if it chooses. BUG=chromium:318290 TEST=Unittest, new autotest network_DhcpFailureWithStaticIP (CL:179783) All other network_Dhcp* unit tests run. Change-Id: I55ed5a7adfc5d97e45ce832e25caab97ff39cea6 Reviewed-on: https://chromium-review.googlesource.com/179786 Reviewed-by: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org>