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
diff --git a/libc/dns/resolv/res_query.c b/libc/dns/resolv/res_query.c
index fa50631..6cd9b15 100644
--- a/libc/dns/resolv/res_query.c
+++ b/libc/dns/resolv/res_query.c
@@ -91,6 +91,7 @@
#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 @@
(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;