summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2015-07-02 13:03:03 +0900
committerLorenzo Colitti <lorenzo@google.com>2015-07-02 13:03:03 +0900
commit1b60d11b8f54f1ade45b80668601bc955041cf4f (patch)
treebb319a13e316dec239c587bc33fe2bcd63bcd73c
parent2bc8485ba79cf6fa95f80b105ed914d245178a0c (diff)
downloadframeworks_base-1b60d11b8f54f1ade45b80668601bc955041cf4f.zip
frameworks_base-1b60d11b8f54f1ade45b80668601bc955041cf4f.tar.gz
frameworks_base-1b60d11b8f54f1ade45b80668601bc955041cf4f.tar.bz2
Make the VPN notice connectivity changes on stacked interfaces.
Currently, the VPN code only looks at base interfaces, so if 464xlat is in use, it will never disconnect when its underlying network has disconnected. Use getAllInterfaceNames().contains() instead of just comparing the base interface name. Bug: 19336810 Change-Id: Id1ba2c80a09cec5098c6f512acdc0a05a939e9f3
-rw-r--r--services/core/java/com/android/server/connectivity/Vpn.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index e1ec8a6..2846185 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -1135,7 +1135,7 @@ public class Vpn {
final ConnectivityManager cm = ConnectivityManager.from(mContext);
for (Network network : cm.getAllNetworks()) {
final LinkProperties lp = cm.getLinkProperties(network);
- if (lp != null && mOuterInterface.equals(lp.getInterfaceName())) {
+ if (lp != null && lp.getAllInterfaceNames().contains(mOuterInterface)) {
final NetworkInfo networkInfo = cm.getNetworkInfo(network);
if (networkInfo != null) mOuterConnection.set(networkInfo.getType());
}