aboutsummaryrefslogtreecommitdiff
path: root/ResolverController.cpp
diff options
context:
space:
mode:
authorMike Yu <yumike@google.com>2020-11-24 17:31:12 +0800
committerMike Yu <yumike@google.com>2020-11-27 21:11:51 +0800
commitf7717f5a4f5200b0c413bbecb6fbf69df9bccdfc (patch)
tree4d15a32e5df71d14587a02a9b55fce3c05b7206d /ResolverController.cpp
parentfa985f71afc584b27b9768f04fb9b5fdfcb047be (diff)
Remove validation threads tracking in PrivateDnsConfiguration
The validation threads tracking is not necessary since DnsTlsServer itself can provide sufficient information to PrivateDnsConfiguration to decide if a validation should start. This change comprises: [1] Remove mPrivateDnsValidateThreads and related functions [2] Extend DnsTlsServer to tell if it is a present server for a network. [3] PrivateDnsConfiguration reserves every DnsTlsServer object until being set to OFF mode or the network is destroyed. Make use of [2] to determine which servers should be active for the network. [4] DnsTlsServers with identical IP address but different private DNS provider hostname are treated as different servers, and thus they have their own validation thread. [5] Add a new state, Validation::success_but_expired, which is used to determine if a server which had passed the validation should be revalidated again. [6] To fit in with [4], some related tests are modified. Bug: 79727473 Test: cd packages/modules/DnsResolver && atest Change-Id: I78afce543ea05be39c36d268576824e9ec798b12
Diffstat (limited to 'ResolverController.cpp')
-rw-r--r--ResolverController.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/ResolverController.cpp b/ResolverController.cpp
index 051f095c..b7ac8eb4 100644
--- a/ResolverController.cpp
+++ b/ResolverController.cpp
@@ -70,6 +70,8 @@ constexpr const char* validationStatusToString(Validation value) {
return "in_process";
case Validation::success:
return "success";
+ case Validation::success_but_expired:
+ return "success_but_expired";
case Validation::fail:
return "fail";
case Validation::unknown_server: