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
Loading
Please register or sign in to comment