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

Commit e871f017 authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by android-build-merger
Browse files

am 78d51c22: Merge "Use the proper IpPrefix and LinkAddress constructors in...

am 78d51c22: Merge "Use the proper IpPrefix and LinkAddress constructors in VPN code." into lmp-mr1-dev automerge: fbaf6b35
automerge: 6840ffae

* commit '6840ffae':
  Use the proper IpPrefix and LinkAddress constructors in VPN code.
parents f0ab37c2 6840ffae
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -501,7 +501,7 @@ public class VpnService extends Service {
                    }
                }
            }
            mRoutes.add(new RouteInfo(new LinkAddress(address, prefixLength), null));
            mRoutes.add(new RouteInfo(new IpPrefix(address, prefixLength), null));
            mConfig.updateAllowedFamilies(address);
            return this;
        }
+3 −6
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.res.Resources;
import android.net.IpPrefix;
import android.net.LinkAddress;
import android.net.Network;
import android.net.RouteInfo;
@@ -117,9 +118,7 @@ public class VpnConfig implements Parcelable {
        String[] routes = routesStr.trim().split(" ");
        for (String route : routes) {
            //each route is ip/prefix
            String[] split = route.split("/");
            RouteInfo info = new RouteInfo(new LinkAddress
                    (InetAddress.parseNumericAddress(split[0]), Integer.parseInt(split[1])), null);
            RouteInfo info = new RouteInfo(new IpPrefix(route), null);
            this.routes.add(info);
            updateAllowedFamilies(info.getDestination().getAddress());
        }
@@ -132,9 +131,7 @@ public class VpnConfig implements Parcelable {
        String[] addresses = addressesStr.trim().split(" ");
        for (String address : addresses) {
            //each address is ip/prefix
            String[] split = address.split("/");
            LinkAddress addr = new LinkAddress(InetAddress.parseNumericAddress(split[0]),
                    Integer.parseInt(split[1]));
            LinkAddress addr = new LinkAddress(address);
            this.addresses.add(addr);
            updateAllowedFamilies(addr.getAddress());
        }