Revert "dns cache per interface iteration 2"
This reverts commit f1464ff95670e6dcc0e12bf9fbbeb4c0346434c9
Change-Id: I3496b9a8cb54614fe3eea016d1391c8a89f3db38
diff --git a/libc/netbsd/resolv/res_send.c b/libc/netbsd/resolv/res_send.c
index 0be6e8e..f3ee539 100644
--- a/libc/netbsd/resolv/res_send.c
+++ b/libc/netbsd/resolv/res_send.c
@@ -370,13 +370,10 @@
ResolvCacheStatus cache_status = RESOLV_CACHE_UNSUPPORTED;
#endif
-#if !USE_RESOLV_CACHE
if (statp->nscount == 0) {
errno = ESRCH;
return (-1);
}
-#endif
-
if (anssiz < HFIXEDSZ) {
errno = EINVAL;
return (-1);
@@ -388,8 +385,7 @@
terrno = ETIMEDOUT;
#if USE_RESOLV_CACHE
- // get the cache associated with the interface
- cache = __get_res_cache(statp->iface);
+ cache = __get_res_cache();
if (cache != NULL) {
int anslen = 0;
cache_status = _resolv_cache_lookup(
@@ -398,17 +394,8 @@
if (cache_status == RESOLV_CACHE_FOUND) {
return anslen;
- } else {
- // had a cache miss for a known interface, so populate the thread private
- // data so the normal resolve path can do its thing
- _resolv_populate_res_for_iface(statp);
}
}
-
- if (statp->nscount == 0) {
- errno = ESRCH;
- return (-1);
- }
#endif
/*