commit | 8ac634057f2a42d98329b6650661535eb98d43eb | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Mon Dec 02 15:28:38 2019 +0800 |
committer | Mike Yu <yumike@google.com> | Tue Dec 03 15:14:53 2019 +0800 |
tree | 931c3bc8c22a2f6998c0e83af76987aa3d23d8a6 | |
parent | de6bd96046cb533d1c7f46f316c9fac2e83634d3 [diff] |
Avoid keeping sending queries to an invalid nameserver When a nameserver is known to be not workable due to wrong setup, e.g. invalid address or network unreachable, it should be considered unusable, just like what the code does for a nameserver which always times out. This change is beneficial to: [1] Fix the bug which the code can never mark all of the nameservers as unusable in some edge cases. [2] Decrease the noise of internal_error in the metrics. Bug: 144828038 Test: cd packages/modules/DnsResolver && atest Change-Id: Id84c49690a7ae1dbd209f9f7751120052efd6c13
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.