diff options
| author | 2014-11-18 00:25:49 +0000 | |
|---|---|---|
| committer | 2014-11-18 00:25:53 +0000 | |
| commit | e9f7e65c4090d7ea97bc065f6fefd58c2fcebd47 (patch) | |
| tree | 38adc59898021c6cf06a3508b205f66093243795 | |
| parent | c9f1b3a0e8f64ae75f71e363c612b8734031b1b2 (diff) | |
| parent | 7f6c0d7d2d5ad9e9f316300ce06f27d8492b05cd (diff) | |
Merge "Populate 464xlat LinkProperties only when the interface comes up." into lmp-mr1-dev
| -rw-r--r-- | services/core/java/com/android/server/connectivity/Nat464Xlat.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/services/core/java/com/android/server/connectivity/Nat464Xlat.java b/services/core/java/com/android/server/connectivity/Nat464Xlat.java index 576556b30648..3fa21d09ee75 100644 --- a/services/core/java/com/android/server/connectivity/Nat464Xlat.java +++ b/services/core/java/com/android/server/connectivity/Nat464Xlat.java @@ -63,8 +63,8 @@ public class Nat464Xlat extends BaseNetworkObserver { // - Idle: start() not called. Everything is null. // - Starting: start() called. Interfaces are non-null. isStarted() returns true. // mIsRunning is false. - // - Running: start() called, and interfaceAdded() told us that mIface is up. Clat IP address - // is non-null. mIsRunning is true. + // - Running: start() called, and interfaceLinkStateChanged() told us that mIface is up. + // mIsRunning is true. // // Once mIface is non-null and isStarted() is true, methods called by ConnectivityService on // its handler thread must not modify any internal state variables; they are only updated by the @@ -236,10 +236,10 @@ public class Nat464Xlat extends BaseNetworkObserver { } @Override - public void interfaceAdded(String iface) { + public void interfaceLinkStateChanged(String iface, boolean up) { // Called by the InterfaceObserver on its own thread, so can race with stop(). - if (isStarted() && mIface.equals(iface)) { - Slog.i(TAG, "interface " + iface + " added, mIsRunning " + mIsRunning + "->true"); + if (isStarted() && up && mIface.equals(iface)) { + Slog.i(TAG, "interface " + iface + " is up, mIsRunning " + mIsRunning + "->true"); if (!mIsRunning) { LinkAddress clatAddress = getLinkAddress(iface); |