diff options
| author | 2022-01-11 08:56:38 +0000 | |
|---|---|---|
| committer | 2022-01-11 08:56:38 +0000 | |
| commit | eaa3fc76a838746655270f040d1c8a45d5e567e1 (patch) | |
| tree | eaf6e4a5368849f42fcefcca3bc3f31171215269 | |
| parent | 69e3121b91c4a4a1e6b1031a61a907dfea75579e (diff) | |
| parent | f9868455f9d4775711112772f3bf410abad4d8f8 (diff) | |
Merge "Allow excludeLocalRoutes set only in bypassable profile"
| -rw-r--r-- | core/java/android/net/Ikev2VpnProfile.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/android/net/Ikev2VpnProfile.java b/core/java/android/net/Ikev2VpnProfile.java index fab692cba2f6..726d870c7761 100644 --- a/core/java/android/net/Ikev2VpnProfile.java +++ b/core/java/android/net/Ikev2VpnProfile.java @@ -163,6 +163,10 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { // UnmodifiableList doesn't make a defensive copy by default. mAllowedAlgorithms = Collections.unmodifiableList(new ArrayList<>(allowedAlgorithms)); + if (excludeLocalRoutes && !isBypassable) { + throw new IllegalArgumentException( + "Vpn should be byassable if excludeLocalRoutes is set"); + } mIsBypassable = isBypassable; mIsMetered = isMetered; |