dns cache per interface iteration 2

name server addresses are read from the dns
cache associated wih the interface on which
the request shall be done.

processes which has requested to issue dns request
using specific interface are now proxied to netd.

added methods to attach/detach a process to a specific
dns cache/interface.

added getaddrinfoforinface method which takes an
interface as an argument.

bug:4815099
bug:5465296
Change-Id: I7a8fe1980cdf99d4d296ddc5c6411f0c72162263
This commit is contained in:
Mattias Falk
2011-08-23 14:34:14 +02:00
committed by Robert Greenwalt
parent 8db7a4cb20
commit c63e59039d
13 changed files with 670 additions and 346 deletions

View File

@@ -282,16 +282,9 @@ DNS resolver:
- read /system/etc/resolv.conf instead of /etc/resolv.conf
- read the list of servers from system properties. the code looks for
'net.dns1', 'net.dns2', etc.. Each property should contain the IP
address of a DNS server.
these properties are set/modified by other parts of the Android system
(e.g. the dhcpd daemon).
the implementation also supports per-process DNS server list, using the
properties 'net.dns1.<pid>', 'net.dns2.<pid>', etc... Where <pid> stands
for the numerical ID of the current process.
- get the list of servers and the search domains for this process's
current interface from the dns cache. This information is sent
from the framework via cache functions.
- when performing a query, use a properly randomized Query ID (instead of
a incremented one), for increased security.