Add excludeLocalRoutes in NativeNetworkConfig
Add a extra field in NativeNetworkConfig to allow CS to notify
netd to exclude the local traffic from the VPN network. Also
freeze netd_aidl_interface as v8 and update the corresponding
configuration.
diff -U10 -ru -N common/netd/aidl_api/netd_aidl_interface/7/android/net/NativeNetworkConfig.aidl common/netd/aidl_api/netd_aidl_interface/8/android/net/NativeNetworkConfig.aidl
--- common/netd/aidl_api/netd_aidl_interface/7/android/net/NativeNetworkConfig.aidl 2021-10-29 14:52:13.069757396 +0800
+++ common/netd/aidl_api/netd_aidl_interface/8/android/net/NativeNetworkConfig.aidl 2022-01-11 21:35:55.088966333 +0800
@@ -33,11 +33,12 @@
package android.net;
/* @hide */
@JavaDerive(equals=true, toString=true) @JavaOnlyImmutable
parcelable NativeNetworkConfig {
int netId;
android.net.NativeNetworkType networkType = android.net.NativeNetworkType.PHYSICAL;
int permission;
boolean secure;
android.net.NativeVpnType vpnType = android.net.NativeVpnType.PLATFORM;
+ boolean excludeLocalRoutes = false;
}
diff -U10 -ru -N common/netd/aidl_api/netd_aidl_interface/7/.hash common/netd/aidl_api/netd_aidl_interface/8/.hash
--- common/netd/aidl_api/netd_aidl_interface/7/.hash 2021-10-29 14:52:13.069757396 +0800
+++ common/netd/aidl_api/netd_aidl_interface/8/.hash 2022-01-11 21:35:55.084966375 +0800
@@ -1 +1 @@
-850353de5d19a0dd718f8fd20791f0532e6a34c7
+e8cf8586fc5da9063818d8775e9a21c4b0addb5b
Bug: 184750836
Test: atest FrameworksNetTests
Change-Id: Icadca719aaba678b06f617c581e3c80a22248f26
diff --git a/staticlibs/netd/Android.bp b/staticlibs/netd/Android.bp
index c3f9374..6a12d64 100644
--- a/staticlibs/netd/Android.bp
+++ b/staticlibs/netd/Android.bp
@@ -21,7 +21,7 @@
sdk_version: "system_current",
min_sdk_version: "29",
static_libs: [
- "netd_aidl_interface-V7-java",
+ "netd_aidl_interface-V8-java",
],
apex_available: [
"//apex_available:platform", // used from services.net
@@ -44,7 +44,7 @@
cc_library_static {
name: "netd_aidl_interface-lateststable-ndk",
whole_static_libs: [
- "netd_aidl_interface-V7-ndk",
+ "netd_aidl_interface-V8-ndk",
],
apex_available: [
"com.android.resolv",
@@ -55,7 +55,7 @@
cc_library_static {
name: "netd_aidl_interface-lateststable-cpp",
whole_static_libs: [
- "netd_aidl_interface-V7-cpp",
+ "netd_aidl_interface-V8-cpp",
],
}
@@ -111,6 +111,7 @@
"5",
"6",
"7",
+ "8",
],
}