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

Commit 4aa9bcf4 authored by Lorenzo Colitti's avatar Lorenzo Colitti
Browse files

Reset connections on all stacked interfaces.

Bug: 8276725
Change-Id: I7fe99c6ea123037cef3e89e3c2c17ed43cc0b1ea
parent ec3928bf
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -119,6 +119,15 @@ public class LinkProperties implements Parcelable {
        return mIfaceName;
    }

    public Collection<String> getAllInterfaceNames() {
        Collection interfaceNames = new ArrayList<String>(mStackedLinks.size() + 1);
        interfaceNames.add(new String(mIfaceName));
        for (LinkProperties stacked: mStackedLinks.values()) {
            interfaceNames.addAll(stacked.getAllInterfaceNames());
        }
        return interfaceNames;
    }

    public Collection<InetAddress> getAddresses() {
        Collection<InetAddress> addresses = new ArrayList<InetAddress>();
        for (LinkAddress linkAddress : mLinkAddresses) {
+20 −19
Original line number Diff line number Diff line
@@ -2256,7 +2256,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
        if (resetMask != 0 || resetDns) {
            LinkProperties linkProperties = mNetTrackers[netType].getLinkProperties();
            if (linkProperties != null) {
                String iface = linkProperties.getInterfaceName();
                for (String iface : linkProperties.getAllInterfaceNames()) {
                    if (TextUtils.isEmpty(iface) == false) {
                        if (resetMask != 0) {
                            if (DBG) log("resetConnections(" + iface + ", " + resetMask + ")");
@@ -2281,6 +2281,7 @@ public class ConnectivityService extends IConnectivityManager.Stub {
                    }
                }
            }
        }

        // Update 464xlat state.
        // TODO: Move to handleConnect()