diff options
| author | Ken Chen <cken@google.com> | 2020-02-21 16:30:47 +0800 |
|---|---|---|
| committer | Ken Chen <cken@google.com> | 2020-02-26 21:31:04 +0800 |
| commit | 89863936e13f39108485029ca6c6b65f24c162c9 (patch) | |
| tree | 9c05a0c8e573c39fb5e4e0043ea3c70d0bf8a52f /server/TetherControllerTest.cpp | |
| parent | 22e5fb8014a304b199f7599504d3dc0a950dcff3 (diff) | |
Pass connectInfo only if ro.vendor.redirect_socket_calls is set
There is a dependency between libnetd_client and netd. The netd checks
size of each FwmarkCommand. The earlier built netd does not expect that
ON_CONNECT command from libnetd_client includes connectInfo. It causes
connect() fail in the combination of new libnetd_client + old netd. With
this commit, the ON_CONNECT pass connectInfo only if OEM sets the
property ro.vendor.redirect_socket_calls. It's OEM responsibility to
ensure that the property is set only on the platform with netd that can
support connectInfo in ON_CONNECT command.
Minor changes:
1. Remove length protection on property retrieval. The
__system_property_get() has built-in length protection. No need to
append Null character.
2. refactor some code by macro.
Bug: 141611769
Bug: 150126287
Test: atest
Test: ./art/tools/run-libcore-tests.sh w/ current and earlier netd, pass
Test: ./art/tools/run-libjdwp-tests.sh w/ current and earlier netd, pass
Change-Id: I90ecba761effa0a5bc403876b9c3de8e77038232
Diffstat (limited to 'server/TetherControllerTest.cpp')
0 files changed, 0 insertions, 0 deletions
