Merge "Explicitly check route type in NetworkDiagnostics" am: 1c2f79705f

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1784544

Change-Id: I3ad62ce4b176c4fecfc100a2171a833d3c967c96
This commit is contained in:
Taras Antoshchuk 2022-03-17 11:33:17 +00:00 • committed by Automerger Merge Worker
commit 37a3fd117b

View file

@ -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()) {