Customized hostname/address table for DNS query
- Some Android OEMs would like to create their own customized table
(hostname/address mapping lists) that the resolver looks up before
querying dns servers and gets the result directly.
- About DNS query, resolver checks system/etc/hosts first. If no data is
found, resolver will query dns from the server. We add a new parameter to
ResolverParamsParcel for OEMs to customize the table and OEMs can use
setDnsConfigurationForNetwork to create the hostname/address lists. After
OEMs create their own lists,the dns query will be following sequence.
system/ect/hosts -> customized table -> dns server
- Add test cases: GetAddrInfoFromCustTable,
GetAddrInfoFromCustTable_InvalidInput,
GetAddrInfoFromCustTable_Modify
Bug: 122998288
Test: cd packages/modules/DnsResolver && atest
Change-Id: I7a2d689de74f0076f0115e0cb20fdc028903ae86
Loading
Please register or sign in to comment