Merge "Add excludeLocalRoutes in NativeNetworkConfig" am: e52be3b59f am: 6571c82556 am: ec42cfc39e

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

Change-Id: Iaeb337a0523806b883ac45c2161a3ee0809d3b13
This commit is contained in:
Chiachang Wang
2022-01-13 01:44:34 +00:00
committed by Automerger Merge Worker
2 changed files with 4 additions and 4 deletions

View File

@@ -4041,11 +4041,11 @@ public class ConnectivityService extends IConnectivityManager.Stub
config = new NativeNetworkConfig(nai.network.getNetId(), NativeNetworkType.VIRTUAL,
INetd.PERMISSION_NONE,
(nai.networkAgentConfig == null || !nai.networkAgentConfig.allowBypass),
getVpnType(nai));
getVpnType(nai), /*excludeLocalRoutes=*/ false);
} else {
config = new NativeNetworkConfig(nai.network.getNetId(), NativeNetworkType.PHYSICAL,
getNetworkPermission(nai.networkCapabilities), /*secure=*/ false,
VpnManager.TYPE_VPN_NONE);
VpnManager.TYPE_VPN_NONE, /*excludeLocalRoutes=*/ false);
}
mNetd.networkCreate(config);
mDnsResolver.createNetworkCache(nai.network.getNetId());

View File

@@ -3386,12 +3386,12 @@ public class ConnectivityServiceTest {
private NativeNetworkConfig nativeNetworkConfigPhysical(int netId, int permission) {
return new NativeNetworkConfig(netId, NativeNetworkType.PHYSICAL, permission,
/*secure=*/ false, VpnManager.TYPE_VPN_NONE);
/*secure=*/ false, VpnManager.TYPE_VPN_NONE, /*excludeLocalRoutes=*/ false);
}
private NativeNetworkConfig nativeNetworkConfigVpn(int netId, boolean secure, int vpnType) {
return new NativeNetworkConfig(netId, NativeNetworkType.VIRTUAL, INetd.PERMISSION_NONE,
secure, vpnType);
secure, vpnType, /*excludeLocalRoutes=*/ false);
}
@Test