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

Commit 89fb3eb7 authored by Robert Greenwalt's avatar Robert Greenwalt Committed by Lorenzo Colitti
Browse files

Stop adding host routes for dns

bug:13550136
Change-Id: I748e13b96dab111f8f6a4b11d9beaf2a72d0742b
parent 7ff49b3a
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
@@ -2703,31 +2703,6 @@ public class ConnectivityService extends IConnectivityManager.Stub {
            }
        }

        if (!isLinkDefault) {
            // handle DNS routes
            if (routesChanged) {
                // routes changed - remove all old dns entries and add new
                if (curLp != null) {
                    for (InetAddress oldDns : curLp.getDnses()) {
                        removeRouteToAddress(curLp, oldDns);
                    }
                }
                if (newLp != null) {
                    for (InetAddress newDns : newLp.getDnses()) {
                        addRouteToAddress(newLp, newDns, exempt);
                    }
                }
            } else {
                // no change in routes, check for change in dns themselves
                for (InetAddress oldDns : dnsDiff.removed) {
                    removeRouteToAddress(curLp, oldDns);
                }
                for (InetAddress newDns : dnsDiff.added) {
                    addRouteToAddress(newLp, newDns, exempt);
                }
            }
        }

        for (RouteInfo r :  routeDiff.added) {
            if (isLinkDefault || ! r.isDefaultRoute()) {
                addRoute(newLp, r, TO_DEFAULT_TABLE, exempt);