Fail fast if somebody is adding default routes

bug:2655011
Change-Id: I25da940e024825bc6e1d1ac5fe7b0d951609c1c1
This commit is contained in:
Robert Greenwalt
2013-03-14 13:16:04 -07:00
parent 555fddb011
commit 6f210bd019
2 changed files with 16 additions and 2 deletions

View File

@@ -711,7 +711,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
InetAddress gatewayAddr =
NetworkUtils.intToInetAddress((int)Long.parseLong(gate, 16));
RouteInfo route = new RouteInfo(linkAddress, gatewayAddr);
RouteInfo route = new RouteInfo(linkAddress, gatewayAddr, iface);
routes.add(route);
} catch (Exception e) {
Log.e(TAG, "Error parsing route " + s + " : " + e);
@@ -743,7 +743,7 @@ public class NetworkManagementService extends INetworkManagementService.Stub
InetAddress gateAddr = NetworkUtils.hexToInet6Address(gate);
RouteInfo route = new RouteInfo(linkAddress, gateAddr);
RouteInfo route = new RouteInfo(linkAddress, gateAddr, iface);
routes.add(route);
} catch (Exception e) {
Log.e(TAG, "Error parsing route " + s + " : " + e);