Expose DNS response code to netd
Currently, DNS query returns error code which may consider rcode only. That may
not respond corresponding error what we need. For example, rcode NOERROR
doesn't really mean no error for the whole DNS query progress. DNS server may
respond a DNS packet without any answer for queried address. In this case,
return error code from h_errno NO_DATA rather than rcode NOERROR.
Changes:
1. Expose timeout error to netd.
2. Not only consider rcode for returning DNS query error code.
3. Enable the following test cases.
- ResolverTest.GetHostByName2_Dns64Synthesize
- ResolverTest.GetAddrInfo_Dns64QuerySpecified
- GetAddrInfoForNetContextTest.AlphabeticalHostname_NoData
Test: built, flashed, booted
system/netd/tests/runtests.sh pass
manual test with unmerged commit aosp/861310
Change-Id: I6723d133afbe56728ecaf35245d1037efc8d6da6
7 files changed