bionic: Replace iface with opaque netid in resolver.
Replace iface cache key with netid. Replace _mark with netid. Mark sockets used to test IPv4/IPv6 support as well as sockets used to determine source address for rfc6724 sort. Remove pid/uid mappings (functionality moved to system/netd). Do not create resolv_cache when it does not exist, but rather only when DNS configuration is supplied. Clean up unused functions. Change-Id: I9ccfda2902cc0943e87c9bc346ad9a2578accdab
This commit is contained in:

committed by
Paul Jensen

parent
bc475bc8d1
commit
ea9bf67881
@@ -91,6 +91,7 @@ __RCSID("$NetBSD: res_query.c,v 1.7 2006/01/24 17:41:25 christos Exp $");
|
||||
#include <errno.h>
|
||||
#include <netdb.h>
|
||||
#ifdef ANDROID_CHANGES
|
||||
#include "resolv_cache.h"
|
||||
#include "resolv_private.h"
|
||||
#else
|
||||
#include <resolv.h>
|
||||
@@ -272,14 +273,14 @@ res_nsearch(res_state statp,
|
||||
(dots && !trailing_dot && (statp->options & RES_DNSRCH) != 0U)) {
|
||||
int done = 0;
|
||||
|
||||
/* Unfortunately we need to load interface info
|
||||
/* Unfortunately we need to load network-specific info
|
||||
* (dns servers, search domains) before
|
||||
* the domain stuff is tried. Will have a better
|
||||
* fix after thread pools are used as this will
|
||||
* be loaded once for the thread instead of each
|
||||
* time a query is tried.
|
||||
*/
|
||||
_resolv_populate_res_for_iface(statp);
|
||||
_resolv_populate_res_for_net(statp);
|
||||
|
||||
for (domain = (const char * const *)statp->dnsrch;
|
||||
*domain && !done;
|
||||
|
Reference in New Issue
Block a user