Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 939e3690 authored by Mike Yu's avatar Mike Yu
Browse files

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
parent cbc280ac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment