Loading core/java/android/net/Ikev2VpnProfile.java +5 −10 Original line number Diff line number Diff line Loading @@ -16,12 +16,9 @@ package android.net; import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_PSK; import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_RSA; import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_USER_PASS; import static com.android.internal.annotations.VisibleForTesting.Visibility; import static com.android.internal.util.Preconditions.checkStringNotEmpty; import static com.android.net.module.util.NetworkStackConstants.IPV6_MIN_MTU; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -158,9 +155,8 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { // IPv6 MTU is greater; since profiles may be started by the system on IPv4 and IPv6 // networks, the VPN must provide a link fulfilling the stricter of the two conditions // (at least that of the IPv6 MTU). if (mMaxMtu < LinkProperties.MIN_MTU_V6) { throw new IllegalArgumentException( "Max MTU must be at least" + LinkProperties.MIN_MTU_V6); if (mMaxMtu < IPV6_MIN_MTU) { throw new IllegalArgumentException("Max MTU must be at least" + IPV6_MIN_MTU); } switch (mType) { Loading Loading @@ -811,9 +807,8 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { // IPv6 MTU is greater; since profiles may be started by the system on IPv4 and IPv6 // networks, the VPN must provide a link fulfilling the stricter of the two conditions // (at least that of the IPv6 MTU). if (mtu < LinkProperties.MIN_MTU_V6) { throw new IllegalArgumentException( "Max MTU must be at least " + LinkProperties.MIN_MTU_V6); if (mtu < IPV6_MIN_MTU) { throw new IllegalArgumentException("Max MTU must be at least " + IPV6_MIN_MTU); } mMaxMtu = mtu; return this; Loading core/java/android/net/LinkProperties.java +1 −2 Original line number Diff line number Diff line Loading @@ -81,8 +81,7 @@ public final class LinkProperties implements Parcelable { private static final int MIN_MTU = 68; /** @hide */ public static final int MIN_MTU_V6 = 1280; private static final int MIN_MTU_V6 = 1280; private static final int MAX_MTU = 10000; Loading Loading
core/java/android/net/Ikev2VpnProfile.java +5 −10 Original line number Diff line number Diff line Loading @@ -16,12 +16,9 @@ package android.net; import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_PSK; import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_RSA; import static android.net.PlatformVpnProfile.TYPE_IKEV2_IPSEC_USER_PASS; import static com.android.internal.annotations.VisibleForTesting.Visibility; import static com.android.internal.util.Preconditions.checkStringNotEmpty; import static com.android.net.module.util.NetworkStackConstants.IPV6_MIN_MTU; import android.annotation.NonNull; import android.annotation.Nullable; Loading Loading @@ -158,9 +155,8 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { // IPv6 MTU is greater; since profiles may be started by the system on IPv4 and IPv6 // networks, the VPN must provide a link fulfilling the stricter of the two conditions // (at least that of the IPv6 MTU). if (mMaxMtu < LinkProperties.MIN_MTU_V6) { throw new IllegalArgumentException( "Max MTU must be at least" + LinkProperties.MIN_MTU_V6); if (mMaxMtu < IPV6_MIN_MTU) { throw new IllegalArgumentException("Max MTU must be at least" + IPV6_MIN_MTU); } switch (mType) { Loading Loading @@ -811,9 +807,8 @@ public final class Ikev2VpnProfile extends PlatformVpnProfile { // IPv6 MTU is greater; since profiles may be started by the system on IPv4 and IPv6 // networks, the VPN must provide a link fulfilling the stricter of the two conditions // (at least that of the IPv6 MTU). if (mtu < LinkProperties.MIN_MTU_V6) { throw new IllegalArgumentException( "Max MTU must be at least " + LinkProperties.MIN_MTU_V6); if (mtu < IPV6_MIN_MTU) { throw new IllegalArgumentException("Max MTU must be at least " + IPV6_MIN_MTU); } mMaxMtu = mtu; return this; Loading
core/java/android/net/LinkProperties.java +1 −2 Original line number Diff line number Diff line Loading @@ -81,8 +81,7 @@ public final class LinkProperties implements Parcelable { private static final int MIN_MTU = 68; /** @hide */ public static final int MIN_MTU_V6 = 1280; private static final int MIN_MTU_V6 = 1280; private static final int MAX_MTU = 10000; Loading