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

Skip to content
Commit fd837fa0 authored by chenbruce's avatar chenbruce
Browse files

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
parent c727677f
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