commit | 4c6849713a838610d8ed868598cedec8f2c96e77 | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Tue Nov 16 20:06:43 2021 +0800 |
committer | Mike Yu <yumike@google.com> | Wed Dec 01 21:40:34 2021 +0800 |
tree | cdd9d1f78830af34a473708cc86b9ca6649bfa13 | |
parent | 549be5d7a989843eeab8e85ef3c39d2f68421aea [diff] |
Make max_idle_timeout configurable Add a new flag, doh_idle_timeout_ms, so as to configure the QUIC transport parameter max_idle_timeout. Like the other flags, the DnsResolver doesn't use the new timeout immediately until either createNetworkCache() or destroyNetworkCache() is called. After the DnsResolver starts using the new timeout, the new timeout will be applied to new networks. The existing networks will still use the old timeout before users change private DNS settings. Bug: 205922706 Test: cd packages/modules/DnsResolver && atest Test: 1. Turned on mobile data and sent some DoH queries 2. Set doh_idle_timeout_ms to 5000 3. Turned on/off wifi to make the flag effective 4. Checked that DnsResolve is using default timeout on the cellular network. 5. Change private DNS settings 6. Checked that DnsResolver started using 5000ms for new DoH connections on the cellular network. Change-Id: I29997164067c190f6e1d07b5815e2170ef425ddb
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.