commit | 021c3e1e8f58bbb84879277a5dd64afc69fdec57 | [log] [tgz] |
---|---|---|
author | Mike Yu <yumike@google.com> | Tue Oct 08 17:29:34 2019 +0800 |
committer | Mike Yu <yumike@google.com> | Mon Oct 21 15:30:23 2019 +0800 |
tree | 62fc407d810e4df1935efde5e268f5554b041904 | |
parent | e655b1d82201b4885a27a54a8fedfbe458257962 [diff] |
Replace addrinfo with IPSockAddr to store dns addresses The struct addrinfo is designed to store multi-addresses and it might cause memory leaks if improperly used. IPSockAddr is safer and is extensible. It also helps simplify the struct resolv_cache_info, where nameservers and nscount is no longer necessary. Bug: 130686826 Test: atest --include-subdirs packages/modules/DnsResolver Change-Id: I3243f2f79c94ebe3d03503914d25b5863da20c09
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.