aboutsummaryrefslogtreecommitdiff
path: root/Android.bp
diff options
context:
space:
mode:
authorMike Yu <yumike@google.com>2019-10-29 17:28:34 +0800
committerMike Yu <yumike@google.com>2019-12-11 22:29:36 +0800
commit939e3690aeb0142679678313a74bf024cfba7129 (patch)
tree4ff8fcdfff1094edc150c0f5b7cb93d3a252ea25 /Android.bp
parentcbc280acb9d1fbaeb7754418fd4560370c3cb7e0 (diff)
downloadDnsResolver-939e3690aeb0142679678313a74bf024cfba7129.tar.gz
Log DNS resolved answers
Introduce a thread-safe queue, DnsQueryLog, to log the DNS resolved answers which are not found in the cache. The sensitive data is masked in order not to reveal privacy information. The log can be shown only by "dumpsys dnsresolver querylog", and it can show only the most-recent-one-hour queries. Example output: DNS query log (last 60 minutes): time=17:27:09.262 netId=100 uid=10107 pid=3322 hostname=w*** answer=[2404:***, 216.***] (33ms) time=17:27:14.303 netId=100 uid=10097 pid=3363 hostname=w*** answer=[13.***] (21ms) Bug: 139040977 Test: cd packages/modules/DnsResolver && atest Test: "adb shell dumpsys dnsresolver querylog" passed Change-Id: I8d063f4ac920f41c4fbc77e60a3e3a919d9daa62
Diffstat (limited to 'Android.bp')
-rw-r--r--Android.bp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 735902b0..50d5dabe 100644
--- a/Android.bp
+++ b/Android.bp
@@ -60,6 +60,7 @@ cc_library {
"util.cpp",
"Dns64Configuration.cpp",
"DnsProxyListener.cpp",
+ "DnsQueryLog.cpp",
"DnsResolver.cpp",
"DnsResolverService.cpp",
"DnsStats.cpp",