summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2021-03-10 17:51:28 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-03-10 17:51:28 +0000
commit10a3cf41c39bf8a280ae23596f8087583ad752ed (patch)
treed0c1c9d1c719f393be8f633bd3a6f7c023ee05f1
parent72b58c37849cfc88cbddb4bacefb8be6baff3b2a (diff)
parent1886366e64200ded44167bd2dc3ca4713a512f41 (diff)
downloadandroid-clat-10a3cf41c39bf8a280ae23596f8087583ad752ed.tar.gz
Merge "Copy the 464xlat vendor property to an AOSP property." am: 1934063f20 am: 1886366e64
Original change: https://android-review.googlesource.com/c/platform/external/android-clat/+/1553819 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: Ifa8fb1cc469af554d91f90814f72c60681aa0f6b
-rw-r--r--Android.bp4
-rw-r--r--vendor-464xlat.rc15
2 files changed, 19 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index adc36e7..4eda2ad 100644
--- a/Android.bp
+++ b/Android.bp
@@ -86,6 +86,10 @@ cc_binary {
tidy_flags: [
"-warnings-as-errors=clang-analyzer-security*,cert-*,android-*",
],
+ // Actually not required for clatd itself. See comments in the rc file.
+ init_rc: [
+ "vendor-464xlat.rc",
+ ],
}
// Unit tests.
diff --git a/vendor-464xlat.rc b/vendor-464xlat.rc
new file mode 100644
index 0000000..609531d
--- /dev/null
+++ b/vendor-464xlat.rc
@@ -0,0 +1,15 @@
+# Certain vendors disable 464xlat by setting a vendor property.
+# The connectivity code in the Tethering APEX needs to disable
+# 464xlat when the property is set, but it is only allowed to
+# access non-vendor system properties. So copy the property to
+# a property available to system APIs in android.sysprop.
+#
+# Arguably this script should live close to the code that uses
+# it, but scrips in APEXes are not allowed to use "on property".
+# So put it here close to clatd, which is at least related to
+# 464xlat.
+on property:persist.vendor.net.doxlat=true
+ setprop net.464xlat.cellular.enabled true
+
+on property:persist.vendor.net.doxlat=false
+ setprop net.464xlat.cellular.enabled false