Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 08b2f2b7 authored by Mike Yu's avatar Mike Yu
Browse files

Support DoT query timeout

The dnsresolver used to await the result from DnsTlsTransport without
a specific timeout. This can cause lookup threads block on waiting the
results for even few minutes.

This CL adds a feature flag, dot_query_timeout_ms, to specify a timeout
for sending a DNS query to DnsTlsTransport. If the flag is either unset
or set to a negative value, the dnsresolver works as before.

The test for DoT revalidation is written in this CL for convenience.

Bug: 120182528
Test: set all the flags off and then run atest
        dot_query_timeout_ms: -1
        dot_revalidation_threshold: -1
        dot_async_handshake: 0
        dot_xport_unusable_threshold: -1
        dot_maxtries: 3
        parallel_lookup_sleep_time: 2
        dot_connect_timeout_ms: 127000
        parallel_lookup_release: 0
        sort_nameservers: 0
        keep_listening_udp: 0

Test: set all the flags on and then run atest
        dot_query_timeout_ms: 10000
        dot_revalidation_threshold: 10
        dot_async_handshake: 1
        dot_xport_unusable_threshold: 20
        dot_maxtries: 1
        parallel_lookup_sleep_time: 2
        dot_connect_timeout_ms: 10000
        parallel_lookup_release: 1
        sort_nameservers: 1
        keep_listening_udp: 1

Change-Id: If468e032bd01df5fdf44e8acf76d294ee4fdf312
parent 58544e24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment