commit | 30013fc871612107ab4757d1cac4d45f613ed1e0 | [log] [tgz] |
---|---|---|
author | Hungming Chen <nuccachen@google.com> | Wed Jul 31 17:38:21 2019 +0800 |
committer | Hungming Chen <nuccachen@google.com> | Wed Sep 04 16:07:35 2019 +0800 |
tree | ef88f2815f345403c2bb350c825879e915230aaf | |
parent | ba69fc1e5349ef99301d82a10264328c70c46046 [diff] |
dns_responder: Add an optional DNS header mapping to build a response Currently, the DNS response is built from the registered hostname or address mapping. The response header fields have been predefined mostly and that may limit the test coverage indirectly. An alternative way is to add an optional DNS header mapping to build a response. The response could be built from a preconfigured DNS header if necessary. That helps to extend the test coverage. Test: cd packages/modules/DnsResolver && atest Change-Id: Ib56ae7b076e8e1e9ebbbca187b66ee91643dd0b0
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.