summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-04-07 16:33:17 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2022-04-07 16:33:17 +0000
commita18c3121d7dc6d76ffed44a084f5c8dfb2101578 (patch)
treedeb8378e6ca4e7c6509d4d705ff84cb43ba2f1d9
parent196fc30c208a8cb21d75c24fa9f15f4ea6d12122 (diff)
parent0684759f10babe50ec0312cdcdb9e694dc9da23c (diff)
downloadbase-a18c3121d7dc6d76ffed44a084f5c8dfb2101578.tar.gz
Merge "Disallow PAP authentication when MPPE is requested am: 4f319df8ff am: 49f031ea4d am: 2f74509789 am: c14e995495" into sc-v2-dev
-rw-r--r--services/core/java/com/android/server/connectivity/Vpn.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/connectivity/Vpn.java b/services/core/java/com/android/server/connectivity/Vpn.java
index 3762ccaae13b..1bd158dfe96e 100644
--- a/services/core/java/com/android/server/connectivity/Vpn.java
+++ b/services/core/java/com/android/server/connectivity/Vpn.java
@@ -2242,6 +2242,13 @@ public class Vpn {
"usepeerdns", "idle", "1800", "mtu", "1270", "mru", "1270",
(profile.mppe ? "+mppe" : "nomppe"),
};
+ if (profile.mppe) {
+ // Disallow PAP authentication when MPPE is requested, as MPPE cannot work
+ // with PAP anyway, and users may not expect PAP (plain text) to be used when
+ // MPPE was requested.
+ mtpd = Arrays.copyOf(mtpd, mtpd.length + 1);
+ mtpd[mtpd.length - 1] = "-pap";
+ }
break;
case VpnProfile.TYPE_L2TP_IPSEC_PSK:
case VpnProfile.TYPE_L2TP_IPSEC_RSA: