]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Restore _res correctly
authorUlrich Drepper <drepper@gmail.com>
Mon, 30 May 2011 03:49:49 +0000 (23:49 -0400)
committerUlrich Drepper <drepper@gmail.com>
Mon, 30 May 2011 03:49:49 +0000 (23:49 -0400)
getaddrinfo works around the resolver functionality to avoid automatic
IPv6 lookups.  The restoring didn't allow for the resolver to set
additional bits in _res.

ChangeLog
NEWS
sysdeps/posix/getaddrinfo.c

index 6f1234343834d8dc8a177fa684e04d1d07d34f6f..70dbc4026b305ae07cc4fa711f2624129b536de1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2011-05-29  Ulrich Drepper  <drepper@gmail.com>
 
+       [BZ #12350]
+       * sysdeps/posix/getaddrinfo.c (gethosts): Restore only RES_USE_IENT6
+       bit from old_res_options.
+       (gaih_inet): Likewise.
+
        [BZ #11099]
        * shadow/sgetspent_r.c (LINE_PARSER): Interpret nymeric field values
        as signed.
diff --git a/NEWS b/NEWS
index 75f7a0da27775e30cf8e5e79e42ff92003af15bf..05f603f541f96e29972e07dee7e361e7c69436cf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -12,13 +12,13 @@ Version 2.14
   386, 6420, 7101, 9730, 9732, 9809, 10138, 10149, 10157, 11099, 11257,
   11258, 11487, 11532, 11558, 11578, 11634, 11653, 11668, 11697, 11724,
   11781, 11799, 11820, 11837, 11857, 11869, 11892, 11895, 11901, 11945,
-  11947, 11952, 11987, 12052, 12083, 12158, 12178, 12200, 12346, 12393,
-  12420, 12432, 12445, 12449, 12453, 12454, 12460, 12469, 12489, 12509,
-  12510, 12511, 12518, 12527, 12541, 12545, 12551, 12582, 12583, 12587,
-  12597, 12601, 12611, 12625, 12626, 12631, 12650, 12653, 12655, 12660,
-  12671, 12681, 12685, 12711, 12713, 12714, 12717, 12723, 12724, 12734,
-  12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792, 12795, 12811,
-  12813, 12814
+  11947, 11952, 11987, 12052, 12083, 12158, 12178, 12200, 12346, 12350,
+  12393, 12420, 12432, 12445, 12449, 12453, 12454, 12460, 12469, 12489,
+  12509, 12510, 12511, 12518, 12527, 12541, 12545, 12551, 12582, 12583,
+  12587, 12597, 12601, 12611, 12625, 12626, 12631, 12650, 12653, 12655,
+  12660, 12671, 12681, 12685, 12711, 12713, 12714, 12717, 12723, 12724,
+  12734, 12738, 12746, 12766, 12775, 12777, 12782, 12788, 12792, 12795,
+  12811, 12813, 12814
 
 * The RPC implementation in libc is obsoleted.  Old programs keep working
   but new programs cannot be linked with the routines in libc anymore.
index 5ddda889cfa9716a85fccc5c9411ccb005efa8e3..1e017b2ed6bb4a16a9cafa081d0851fa546dbd71 100644 (file)
@@ -207,7 +207,7 @@ gaih_inet_serv (const char *servicename, const struct gaih_typeproto *tp,
       if (herrno == NETDB_INTERNAL)                                          \
        {                                                                     \
          __set_h_errno (herrno);                                             \
-         _res.options = old_res_options;                                     \
+         _res.options |= old_res_options & RES_USE_INET6;                    \
          return -EAI_SYSTEM;                                                 \
        }                                                                     \
       if (herrno == TRY_AGAIN)                                               \
@@ -1015,7 +1015,7 @@ gaih_inet (const char *name, const struct gaih_service *service,
                nip = nip->next;
            }
 
-         _res.options = old_res_options;
+         _res.options |= old_res_options & RES_USE_INET6;
 
          if (no_data != 0 && no_inet6_data != 0)
            {