Receive all the resolver info from ConnectivityService
Note that as of this change we still only program bionic with one
set of servers (TLS if available, locally assigned otherwise). This
will be remedied in a future change.
Test: ./system/netd/tests/runtests.sh
Test: manual testing of opportunistic and strictm mode works
Bug: 34953048
Bug: 64133961
Bug: 72345192
Merged-In: I9886811f3a298f107b196da03ad7ae45fc61d21c
Merged-In: Ie6b194311da945c55bc79250effaa753eec6becf
Change-Id: I6a0ec6672ce88e61118b34ed03818bbf53158103
(cherry picked from commit a1476fb7d8baeb0fe38cdd07ad94f57808a9c8f0)
diff --git a/server/NetdNativeService.cpp b/server/NetdNativeService.cpp
index 31a87dc..29ed511 100644
--- a/server/NetdNativeService.cpp
+++ b/server/NetdNativeService.cpp
@@ -288,7 +288,8 @@
binder::Status NetdNativeService::setResolverConfiguration(int32_t netId,
const std::vector<std::string>& servers, const std::vector<std::string>& domains,
- const std::vector<int32_t>& params, bool useTls, const std::string& tlsName,
+ const std::vector<int32_t>& params, const std::string& tlsName,
+ const std::vector<std::string>& tlsServers,
const std::vector<std::string>& tlsFingerprints) {
// This function intentionally does not lock within Netd, as Bionic is thread-safe.
ENFORCE_PERMISSION(CONNECTIVITY_INTERNAL);
@@ -304,7 +305,7 @@
}
int err = gCtls->resolverCtrl.setResolverConfiguration(netId, servers, domains, params,
- useTls, tlsName, decoded_fingerprints);
+ tlsName, tlsServers, decoded_fingerprints);
if (err != 0) {
return binder::Status::fromServiceSpecificError(-err,
String8::format("ResolverController error: %s", strerror(-err)));