commit | d35d292452618cff69bb890275a91dbfda91dc34 | [log] [tgz] |
---|---|---|
author | Bernie Innocenti <codewiz@google.com> | Tue Oct 08 23:34:53 2019 +0900 |
committer | Bernie Innocenti <codewiz@google.com> | Wed Oct 09 00:22:18 2019 +0900 |
tree | a2c979f10655d2937496600e2d1cccf8c9682258 | |
parent | 3479d3b0dad4d626ebb33ee569f0e286d472599a [diff] |
Remove separate IPv4-only nsaddr_list from res_state The res_state struct held two separate lists of nameserver addresses, presumably for binary compatibility with userspace poking directly at libc internal data structures. This change removes the IPv4 only statp->nsaddr_list and keeps the deeply-nested statp->_u._ext.ext->nsaddrs, which is a sockaddr_union. While cleaning up res_init, I had a wtf moment when I noticed that HAS_INET6_STRUCTS is never defined. So, we don't actually support v6 nameservers??? The truth is: we don't really use res_setservers() other than at initialization time, when it's a no-op, and res_getservers() was actually dead code. So they can both rest in peace. Test: m, flashall, atest Change-Id: Iba0d5aa73f531b5ed925eb4178e5d5883c12a23d
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.