commit | f7717f5a4f5200b0c413bbecb6fbf69df9bccdfc | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Tue Nov 24 17:31:12 2020 +0800 |
committer | Mike Yu <yumike@google.com> | Fri Nov 27 21:11:51 2020 +0800 |
tree | 4d15a32e5df71d14587a02a9b55fce3c05b7206d | |
parent | fa985f71afc584b27b9768f04fb9b5fdfcb047be [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
This code uses LOG(X) for logging. Log levels are VERBOSE,DEBUG,INFO,WARNING and ERROR. The default setting is WARNING and logs relate to WARNING and ERROR will be shown. If you want to enable the DEBUG level logs, using following command. adb shell service call dnsresolver 10 i32 1 VERBOSE 0 DEBUG 1 INFO 2 WARNING 3 ERROR 4 Verbose resolver logs could contain PII -- do NOT enable in production builds.