Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8d2b511 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge changes from topic "ikeparams-api-change-rvc-dev" into rvc-dev am: d3c7f0c2

Change-Id: Ieb48c3865f981f852e63d3f6912f8b769307af61
parents 272225d6 d3c7f0c2
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -2357,10 +2357,11 @@ public class Vpn {


                    // TODO: Remove the need for adding two unused addresses with
                    // TODO: Remove the need for adding two unused addresses with
                    // IPsec tunnels.
                    // IPsec tunnels.
                    final InetAddress address = InetAddress.getLocalHost();
                    mTunnelIface =
                    mTunnelIface =
                            mIpSecManager.createIpSecTunnelInterface(
                            mIpSecManager.createIpSecTunnelInterface(
                                    ikeSessionParams.getServerAddress() /* unused */,
                                    address /* unused */,
                                    ikeSessionParams.getServerAddress() /* unused */,
                                    address /* unused */,
                                    network);
                                    network);
                    mNetd.setInterfaceUp(mTunnelIface.getInterfaceName());
                    mNetd.setInterfaceUp(mTunnelIface.getInterfaceName());


+1 −5
Original line number Original line Diff line number Diff line
@@ -85,16 +85,12 @@ import java.util.List;
public class VpnIkev2Utils {
public class VpnIkev2Utils {
    static IkeSessionParams buildIkeSessionParams(
    static IkeSessionParams buildIkeSessionParams(
            @NonNull Context context, @NonNull Ikev2VpnProfile profile, @NonNull Network network) {
            @NonNull Context context, @NonNull Ikev2VpnProfile profile, @NonNull Network network) {
        // TODO(b/149356682): Update this based on new IKE API. Only numeric addresses supported
        //                    until then. All others throw IAE (caught by caller).
        final InetAddress serverAddr = InetAddresses.parseNumericAddress(profile.getServerAddr());
        final IkeIdentification localId = parseIkeIdentification(profile.getUserIdentity());
        final IkeIdentification localId = parseIkeIdentification(profile.getUserIdentity());
        final IkeIdentification remoteId = parseIkeIdentification(profile.getServerAddr());
        final IkeIdentification remoteId = parseIkeIdentification(profile.getServerAddr());


        // TODO(b/149356682): Update this based on new IKE API.
        final IkeSessionParams.Builder ikeOptionsBuilder =
        final IkeSessionParams.Builder ikeOptionsBuilder =
                new IkeSessionParams.Builder(context)
                new IkeSessionParams.Builder(context)
                        .setServerAddress(serverAddr)
                        .setServerHostname(profile.getServerAddr())
                        .setNetwork(network)
                        .setNetwork(network)
                        .setLocalIdentification(localId)
                        .setLocalIdentification(localId)
                        .setRemoteIdentification(remoteId);
                        .setRemoteIdentification(remoteId);