Explicitly check route type in NetworkDiagnostics
LinkProperties.getRoutes() can now return throw routes as well so we need to check the route type before consuming it if we only intend to use unicast routes. Test: none Bug: 186082280 Change-Id: I2a35170f8002a16c49584c7f85cd02f0c34f35b0
This commit is contained in:
committed by
Muhammad Hasan Khan
parent
61ef984d52
commit
698a57c268
@@ -206,7 +206,7 @@ public class NetworkDiagnostics {
|
||||
}
|
||||
|
||||
for (RouteInfo route : mLinkProperties.getRoutes()) {
|
||||
if (route.hasGateway()) {
|
||||
if (route.getType() == RouteInfo.RTN_UNICAST && route.hasGateway()) {
|
||||
InetAddress gateway = route.getGateway();
|
||||
prepareIcmpMeasurement(gateway);
|
||||
if (route.isIPv6Default()) {
|
||||
|
||||
Reference in New Issue
Block a user