forked from pool/glibc
Andreas Schwab
f99cf3ddb6
- abort-no-flush.patch: Don't close or flush stdio streams on abort (BZ #15436) - fix-locking-in-_IO_cleanup.patch: always do locking when accessing streams (bnc#796982, BZ #15142) - resolv-dont-ignore-second-answer.patch: don't ignore second answer from nameserver if the first one was empty (bnc#767266, BZ #13651) - ldd-system-interp.patch: Never try to execute the file in ldd (bnc#677787, BZ #16750) - check-pf-alloca.patch: Account for alloca use when collecting interface addresses (bnc#785041, BZ #16002) - powerpc-opt-power8.patch: two more POWER8 optimisations (bnc#866711, fate#315443) - getaddrinfo-uninit-result.patch: Fix use of half-initialized result in getaddrinfo when using nscd (bnc#867636, BZ #16743) OBS-URL: https://build.opensuse.org/request/show/227472 OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=343
34 lines
1.1 KiB
Diff
34 lines
1.1 KiB
Diff
Don't ignore second answer from nameserver if the first one was empty (BZ #13651)
|
|
|
|
Index: glibc-2.19/resolv/res_query.c
|
|
===================================================================
|
|
--- glibc-2.19.orig/resolv/res_query.c
|
|
+++ glibc-2.19/resolv/res_query.c
|
|
@@ -382,7 +382,7 @@ __libc_res_nsearch(res_state statp,
|
|
answer, anslen, answerp,
|
|
answerp2, nanswerp2, resplen2,
|
|
answerp2_malloced);
|
|
- if (ret > 0 || trailing_dot)
|
|
+ if (ret > 0 || (ret == 0 && *resplen2 > 0) || trailing_dot)
|
|
return (ret);
|
|
saved_herrno = h_errno;
|
|
tried_as_is++;
|
|
@@ -422,7 +422,7 @@ __libc_res_nsearch(res_state statp,
|
|
answer, anslen, answerp,
|
|
answerp2, nanswerp2,
|
|
resplen2, answerp2_malloced);
|
|
- if (ret > 0)
|
|
+ if (ret > 0 || (ret == 0 && *resplen2 > 0))
|
|
return (ret);
|
|
|
|
if (answerp && *answerp != answer) {
|
|
@@ -491,7 +491,7 @@ __libc_res_nsearch(res_state statp,
|
|
answer, anslen, answerp,
|
|
answerp2, nanswerp2, resplen2,
|
|
answerp2_malloced);
|
|
- if (ret > 0)
|
|
+ if (ret > 0 || (ret == 0 && *resplen2 > 0))
|
|
return (ret);
|
|
}
|
|
|