Skip to content

Commit 4efe58d

Browse files
author
Robert Greenwalt
committed
Temp disable Tethering if DUN is required
Getting source-based routing working is too risk for this point in the project but tethering is broken otherwise, so disable the tethering option if DUN is required until we can get a real fix in. bug:5495862 Change-Id: I5e852bf30c887599024a8b61af86ffec1d5333af
1 parent 8d059ac commit 4efe58d

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

services/java/com/android/server/ConnectivityService.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2450,6 +2450,12 @@ public boolean isTetheringSupported() {
24502450
int defaultVal = (SystemProperties.get("ro.tether.denied").equals("true") ? 0 : 1);
24512451
boolean tetherEnabledInSettings = (Settings.Secure.getInt(mContext.getContentResolver(),
24522452
Settings.Secure.TETHER_SUPPORTED, defaultVal) != 0);
2453+
// Short term disabling of Tethering if DUN is required.
2454+
// TODO - fix multi-connection tethering using policy-base routing
2455+
int[] upstreamConnTypes = mTethering.getUpstreamIfaceTypes();
2456+
for (int i : upstreamConnTypes) {
2457+
if (i == ConnectivityManager.TYPE_MOBILE_DUN) return false;
2458+
}
24532459
return tetherEnabledInSettings && mTetheringConfigValid;
24542460
}
24552461

0 commit comments

Comments
 (0)