about summary refs log tree commit diff
path: root/nscd
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-04-08 10:40:31 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-04-08 10:56:22 +0200
commit3f8b44be0a658266adff5ece1e4bc3ce097a5dbe (patch)
tree060ffb11ccd5433902b8c60c3e80dc0f140ec55d /nscd
parent94e358f6d490650c714edb1ffc3a52f56ffe086e (diff)
downloadglibc-3f8b44be0a658266adff5ece1e4bc3ce097a5dbe.tar.gz
glibc-3f8b44be0a658266adff5ece1e4bc3ce097a5dbe.tar.xz
glibc-3f8b44be0a658266adff5ece1e4bc3ce097a5dbe.zip
resolv: Remove support for RES_USE_INET6 and the inet6 option
This functionality was deprecated in glibc 2.25.

This commit only includes the core changes to remove the
functionality.  It does not remove the RES_USE_INET6 handling in the
individual NSS service modules and the res_use_inet6 function.
These changes will happen in future commits.
Diffstat (limited to 'nscd')
-rw-r--r--nscd/aicache.c8
-rw-r--r--nscd/nscd_gethst_r.c6
2 files changed, 2 insertions, 12 deletions
diff --git a/nscd/aicache.c b/nscd/aicache.c
index cf9b91d149..5b94e2aa9e 100644
--- a/nscd/aicache.c
+++ b/nscd/aicache.c
@@ -27,7 +27,6 @@
 #include <sys/mman.h>
 #include <resolv/resolv-internal.h>
 #include <resolv/resolv_context.h>
-#include <resolv/res_use_inet6.h>
 #include <scratch_buffer.h>
 
 #include "dbg_log.h"
@@ -100,12 +99,8 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
     no_more = 0;
   nip = hosts_database;
 
-  /* Initialize configurations.  If we are looking for both IPv4 and
-     IPv6 address we don't want the lookup functions to automatically
-     promote IPv4 addresses to IPv6 addresses.  Therefore, use the
-     _no_inet6 variant.  */
+  /* Initialize configurations.  */
   struct resolv_context *ctx = __resolv_context_get ();
-  bool enable_inet6 = __resolv_context_disable_inet6 (ctx);
   if (ctx == NULL)
     no_more = 1;
 
@@ -513,7 +508,6 @@ next_nip:
    }
 
  out:
-  __resolv_context_enable_inet6 (ctx, enable_inet6);
   __resolv_context_put (ctx);
 
   if (dataset != NULL && !alloca_used)
diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c
index 97c6190c95..f4c5849862 100644
--- a/nscd/nscd_gethst_r.c
+++ b/nscd/nscd_gethst_r.c
@@ -40,11 +40,7 @@ __nscd_gethostbyname_r (const char *name, struct hostent *resultbuf,
 			char *buffer, size_t buflen, struct hostent **result,
 			int *h_errnop)
 {
-  request_type reqtype;
-
-  reqtype = res_use_inet6 () ? GETHOSTBYNAMEv6 : GETHOSTBYNAME;
-
-  return nscd_gethst_r (name, strlen (name) + 1, reqtype, resultbuf,
+  return nscd_gethst_r (name, strlen (name) + 1, GETHOSTBYNAME, resultbuf,
 			buffer, buflen, result, h_errnop);
 }