Set maximum attempt for opportunistic mode private DNS validation
If a private DNS works but it's always too slow to fit the latency
threshold, private DNS validation can be endless. To address this
problem, limit the number of attempts to three. If a private DNS
validation has attempted on three probes, it will finish.
Besides, latencyThreshold calculated at the beginning of validation
can be too outdated to be useful because of the backoff time which
starts with one minute delay. Change the code to update
latencyThreshold every time when probe is about to begin.
Bug: 188153519
Test: run atest with all the flags off/on
avoid_bad_private_dns: 0 / 1
sort_nameservers: 0 / 1
dot_xport_unusable_threshold: -1 / 20
dot_query_timeout_ms: -1 / 10000
min_private_dns_latency_threshold_ms: -1 / 500
keep_listening_udp: 0 / 1
parallel_lookup_sleep_time: 2 / 2
dot_revalidation_threshold: -1 / 10
max_private_dns_latency_threshold_ms: -1 / 2000
dot_async_handshake: 0 / 1
dot_maxtries: 3 / 1
dot_connect_timeout_ms: 127000 / 10000
parallel_lookup_release: UNSET / UNSET
Change-Id: I8251681152e4ed72bf5232ab688267e6d92878c4
Loading
Please register or sign in to comment