commit | 9934488b7b412ef45709607dae9fbbfc3af7a2ef | [log] [tgz] |
---|---|---|
author | Ken Chen <cken@google.com> | Wed Jan 01 14:59:38 2020 +0800 |
committer | Ken Chen <cken@google.com> | Wed Jan 22 22:40:57 2020 +0800 |
tree | d7933f41344916e7cdcff1e9700baa753a42dc40 | |
parent | 44a54601807df7d958af1ea994303b34f205c52f [diff] |
Support alternative handling on truncated DNS response The default behavior of UDP truncated DNS response is that the DNS resolver fallback on TCP on the same server. If the fallback retry is failed, do TCP retry on the rest of servers. However, OEM reported that the rest of servers may respond a valid answer on UDP connection, but support no TCP connection. Thus, an alternative truncated response handling mode is added for OEMs. With the alternative mode, the DNS resolver fallback retries on TCP on the same server. If the TCP retry is failed, do UDP retry on the next server, then TCP, and so on. Set mode by ResolverExperimentalOptionsParcel in ResolverParamsParcel. tcMode=0 or absent, run default behavior (TCP-only on each DNS server). tcMode=1, run alternative mode (UDP first on each DNS server). other values are invalid input, take no effect. Bug: 139646101 Change-Id: I724cc54bd9fad95954de84c281dd6f1d0b764caa
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.