diff options
| author | 2022-09-01 01:26:36 +0000 | |
|---|---|---|
| committer | 2022-09-20 03:39:06 +0000 | |
| commit | 2ed1cda859702a8c2fbf64c89a2eb07040df24a0 (patch) | |
| tree | a5655683dc7d9eea465707586c6ee553641d2e56 | |
| parent | 1c2c0b52584895d4999ff7a47eeea89ced8fd2ca (diff) | |
Skip duplicate parameters when IkeTunnelConnectionParams provided
For those fields existing in the IkeTunnelConnectionParams,
the value should be retrieved from the object to honor the
setting in the object. IkeTunnelConnectionParams are serialized
in a safe manner to ensure that they do not conflict with the
serialization scheme of VpnProfile. However, copying some of
these fields(e.g. IkeKeyId) may conflict with the serialization
scheme.
Bug: 243718982
Test: atest FrameworksNetTests CtsNetTestCases
Change-Id: I510c47e26feabd5cebe9497ef495e4d729d0f7c6
(cherry picked from commit 84afc69b95dee89fd4e7a9567dc3ef8dd56bc385)
Merged-In: I510c47e26feabd5cebe9497ef495e4d729d0f7c6
| -rw-r--r-- | core/java/android/net/Ikev2VpnProfile.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/java/android/net/Ikev2VpnProfile.java b/core/java/android/net/Ikev2VpnProfile.java index 3979c6c78dcb..10ce3bf78b2a 100644 --- a/core/java/android/net/Ikev2VpnProfile.java +++ b/core/java/android/net/Ikev2VpnProfile.java @@ -483,9 +483,6 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { final VpnProfile profile = new VpnProfile("" /* Key; value unused by IKEv2VpnProfile(s) */, mIsRestrictedToTestNetworks, mExcludeLocalRoutes, mRequiresInternetValidation, mIkeTunConnParams); - - profile.server = getServerAddr(); - profile.ipsecIdentifier = getUserIdentity(); profile.proxy = mProxyInfo; profile.isBypassable = mIsBypassable; profile.isMetered = mIsMetered; @@ -499,6 +496,8 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { } profile.type = mType; + profile.server = getServerAddr(); + profile.ipsecIdentifier = getUserIdentity(); profile.setAllowedAlgorithms(mAllowedAlgorithms); switch (mType) { case TYPE_IKEV2_IPSEC_USER_PASS: |