about summary refs log tree commit diff
path: root/resolv/res_send.c
Commit message (Collapse)AuthorAgeFilesLines
* resolv: Introduce struct resolv_context [BZ #21668]Florian Weimer2017-07-031-13/+31
| | | | | | | | | | | | struct resolv_context objects provide a temporary resolver context which does not change during a name lookup operation. Only when the outmost context is created, the stub resolver configuration is verified to be current (at present, only against previous res_init calls). Subsequent attempts to obtain the context will reuse the result of the initial verification operation. struct resolv_context can also be extended in the future to store data which needs to be deallocated during thread cancellation.
* resolv: Move res_isourserver, res_send from res_data.c to res_send.cFlorian Weimer2017-06-301-0/+15
|
* resolv: Remove DEBUG from resolv/res_send.cFlorian Weimer2017-06-301-144/+1
|
* resolv: Make RES_ROTATE start with a random name server [BZ #19570]Florian Weimer2017-06-301-28/+72
| | | | | Do not copy the actual name server addresses to rotate them. Use a global rotation offset instead.
* resolv: Replace __builtin_expect with __glibc_unlikely/__glibc_likelyFlorian Weimer2017-04-191-1/+1
|
* Create more sockets with SOCK_CLOEXEC [BZ #15722]Florian Weimer2017-04-191-5/+8
|
* resolv: Remove EDNS fallback [BZ #21369]Florian Weimer2017-04-131-20/+0
| | | | | | EDNS is disabled by default (so there is interoperability issue), and the fallback code is problematic because it prevents an application from obtaining DNSSEC data after a FORMERR response.
* resolv: Remove internal and unused definitions from <resolv.h>Florian Weimer2017-04-131-1/+1
| | | | | | | The RES_F_* constants are only used with the private _res._flags member. RES_EXHAUSTIVE is unused. The removed function declarations refer to functions not actually exported by glibc, so they are unusable by applications.
* Narrowing the visibility of libc-internal.h even further.Zack Weinberg2017-03-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | posix/wordexp-test.c used libc-internal.h for PTR_ALIGN_DOWN; similar to what was done with libc-diag.h, I have split the definitions of cast_to_integer, ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN to a new header, libc-pointer-arith.h. It then occurred to me that the remaining declarations in libc-internal.h are mostly to do with early initialization, and probably most of the files including it, even in the core code, don't need it anymore. Indeed, only 19 files actually need what remains of libc-internal.h. 23 others need libc-diag.h instead, and 12 need libc-pointer-arith.h instead. No file needs more than one of them, and 16 don't need any of them! So, with this patch, libc-internal.h stops including libc-diag.h as well as losing the pointer arithmetic macros, and all including files are adjusted. * include/libc-pointer-arith.h: New file. Define cast_to_integer, ALIGN_UP, ALIGN_DOWN, PTR_ALIGN_UP, and PTR_ALIGN_DOWN here. * include/libc-internal.h: Definitions of above macros moved from here. Don't include libc-diag.h anymore either. * posix/wordexp-test.c: Include stdint.h and libc-pointer-arith.h. Don't include libc-internal.h. * debug/pcprofile.c, elf/dl-tunables.c, elf/soinit.c, io/openat.c * io/openat64.c, misc/ptrace.c, nptl/pthread_clock_gettime.c * nptl/pthread_clock_settime.c, nptl/pthread_cond_common.c * string/strcoll_l.c, sysdeps/nacl/brk.c * sysdeps/unix/clock_settime.c * sysdeps/unix/sysv/linux/i386/get_clockfreq.c * sysdeps/unix/sysv/linux/ia64/get_clockfreq.c * sysdeps/unix/sysv/linux/powerpc/get_clockfreq.c * sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c: Don't include libc-internal.h. * elf/get-dynamic-info.h, iconv/loop.c * iconvdata/iso-2022-cn-ext.c, locale/weight.h, locale/weightwc.h * misc/reboot.c, nis/nis_table.c, nptl_db/thread_dbP.h * nscd/connections.c, resolv/res_send.c, soft-fp/fmadf4.c * soft-fp/fmasf4.c, soft-fp/fmatf4.c, stdio-common/vfscanf.c * sysdeps/ieee754/dbl-64/e_lgamma_r.c * sysdeps/ieee754/dbl-64/k_rem_pio2.c * sysdeps/ieee754/flt-32/e_lgammaf_r.c * sysdeps/ieee754/flt-32/k_rem_pio2f.c * sysdeps/ieee754/ldbl-128/k_tanl.c * sysdeps/ieee754/ldbl-128ibm/k_tanl.c * sysdeps/ieee754/ldbl-96/e_lgammal_r.c * sysdeps/ieee754/ldbl-96/k_tanl.c, sysdeps/nptl/futex-internal.h: Include libc-diag.h instead of libc-internal.h. * elf/dl-load.c, elf/dl-reloc.c, locale/programs/locarchive.c * nptl/nptl-init.c, string/strcspn.c, string/strspn.c * malloc/malloc.c, sysdeps/i386/nptl/tls.h * sysdeps/nacl/dl-map-segments.h, sysdeps/x86_64/atomic-machine.h * sysdeps/unix/sysv/linux/spawni.c * sysdeps/x86_64/nptl/tls.h: Include libc-pointer-arith.h instead of libc-internal.h. * elf/get-dynamic-info.h, sysdeps/nacl/dl-map-segments.h * sysdeps/x86_64/atomic-machine.h: Add multiple include guard.
* Update copyright dates with scripts/update-copyrights.Joseph Myers2017-01-011-1/+1
|
* resolv: Deprecate RES_BLASTFlorian Weimer2016-12-311-2/+1
|
* Fix typos in the spelling of "implementation"Dmitry V. Levin2016-12-271-1/+1
| | | | | | | | | | | | | Apply the following spelling fix: $ git grep -El 'implemetn?ation' | xargs sed -ri 's/implemetn?ation/implementation/g' [BZ #19514] * resolv/res_send.c: Fix typo in comment. * sysdeps/i386/i386-mcount.S: Likewise. * sysdeps/s390/s390-32/s390-mcount.S: Likewise. * sysdeps/s390/s390-64/s390x-mcount.S: Likewise. * sysdeps/sparc/sparc-mcount.S: Likewise.
* Bug 20729: Fix build failures on ppc64 and other arches.Carlos O'Donell2016-11-021-2/+2
| | | | | | | | The changes to fix bug 20729 introduced an error which removed an ignore diagnostic from -O2 by using the new -Os related macro. This broke ppc64 builds. This commit fixes the mistake. Tested on x86, x86_64, ppc64, ppc64le, arm, aarch64, and s390x.
* Bug 20729: Fix building with -Os.Carlos O'Donell2016-10-291-1/+10
| | | | | | | | | | This commit adds a new DIAG_IGNORE_Os_NEEDS_COMMENT which is only enabled when compiling with -Os. This allows developers working on -Os enabled builds to mark false-positive warnings without impacting the warnings emitted at -O2. Then using the new DIAG_IGNORE_Os_NEEDS_COMMENT we fix 6 warnings generated with GCC 5 to get -Os builds working again.
* resolv: Remove unsupported hook functions from the API [BZ #20016]Florian Weimer2016-09-211-85/+0
|
* resolv: Remove SCCS and RCS keywordsFlorian Weimer2016-04-281-5/+0
|
* resolv: Always set *resplen2 out parameter in send_vc [BZ #19825]Florian Weimer2016-04-271-21/+18
| | | | | | | In various error scenarios (for example, if the server closes the TCP connection before sending the full response), send_vc can return without resetting the *resplen2 value. This can pass uninitialized or unexpected data to the caller.
* resolv: Always set *resplen2 out parameter in send_dg [BZ #19791]Florian Weimer2016-03-251-23/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit 44d20bca52ace85850012b0ead37b360e3ecd96e (Implement second fallback mode for DNS requests), there is a code path which returns early, before *resplen2 is initialized. This happens if the name server address is immediately recognized as invalid (because of lack of protocol support, or if it is a broadcast address such 255.255.255.255, or another invalid address). If this happens and *resplen2 was non-zero (which is the case if a previous query resulted in a failure), __libc_res_nquery would reuse an existing second answer buffer. This answer has been previously identified as unusable (for example, it could be an NXDOMAIN response). Due to the presence of a second answer, no name server switching will occur. The result is a name resolution failure, although a successful resolution would have been possible if name servers have been switched and queries had proceeded along the search path. The above paragraph still simplifies the situation. Before glibc 2.23, if the second answer needed malloc, the stub resolver would still attempt to reuse the second answer, but this is not possible because __libc_res_nsearch has freed it, after the unsuccessful call to __libc_res_nquerydomain, and set the buffer pointer to NULL. This eventually leads to an assertion failure in __libc_res_nquery: /* Make sure both hp and hp2 are defined */ assert((hp != NULL) && (hp2 != NULL)); If assertions are disabled, the consequence is a NULL pointer dereference on the next line. Starting with glibc 2.23, as a result of commit e9db92d3acfe1822d56d11abcea5bfc4c41cf6ca (CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665)), the second answer is always allocated with malloc. This means that the assertion failure happens with small responses as well because there is no buffer to reuse, as soon as there is a name resolution failure which triggers a search for an answer along the search path. This commit addresses the issue by ensuring that *resplen2 is initialized before the send_dg function returns. This commit also addresses a bug where an invalid second reply is incorrectly returned as a valid to the caller.
* CVE-2015-7547: getaddrinfo() stack-based buffer overflow (Bug 18665).Carlos O'Donell2016-02-161-63/+197
| | | | | | | | | | | | | | | | | | | | * A stack-based buffer overflow was found in libresolv when invoked from libnss_dns, allowing specially crafted DNS responses to seize control of execution flow in the DNS client. The buffer overflow occurs in the functions send_dg (send datagram) and send_vc (send TCP) for the NSS module libnss_dns.so.2 when calling getaddrinfo with AF_UNSPEC family. The use of AF_UNSPEC triggers the low-level resolver code to send out two parallel queries for A and AAAA. A mismanagement of the buffers used for those queries could result in the response of a query writing beyond the alloca allocated buffer created by _nss_dns_gethostbyname4_r. Buffer management is simplified to remove the overflow. Thanks to the Google Security Team and Red Hat for reporting the security impact of this issue, and Robert Holiday of Ciena for reporting the related bug 18665. (CVE-2015-7547) See also: https://sourceware.org/ml/libc-alpha/2016-02/msg00416.html https://sourceware.org/ml/libc-alpha/2016-02/msg00418.html
* Fix build failures with -DDEBUG.Martin Sebor2016-01-151-2/+2
| | | | | | | | | | | | | [BZ #19443] * crypt/crypt_util.c [DEBUG] (_ufc_prbits): Correct format string. [DEBUG] (_ufc_set_bits): Declare used. * iconv/gconv_dl.c [DEBUG]: Add a missing include directive. [DEBUG] (print_all): Declare used. * resolv/res_send.c [DEBUG] (__libc_res_nsend): Explicitly convert operands of the ternary ?: expression to target type. * stdlib/rshift.c [DEBUG] (mpn_rshift): Use assert() instead of calling the undeclared abort. * time/mktime.c [DEBUG] (DEBUG): Rename to DEBUG_MKTIME.
* Remove GCC version conditionals on -Wmaybe-uninitialized pragmas.Joseph Myers2015-10-271-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One common case of __GNUC_PREREQ (4, 7) conditionals is use of diagnostic control pragmas for -Wmaybe-uninitialized, an option introduced in GCC 4.7 where older GCC needed -Wuninitialized to be controlled instead if the warning appeared with older GCC. This patch removes such conditionals. (There remain several older uses of -Wno-uninitialized in makefiles that still need to be converted to diagnostic control pragmas if the issue is still present with current sources and supported GCC versions, and it's likely that in most cases those pragmas also will end up controlling -Wmaybe-uninitialized.) Tested for x86_64 and x86 (testsuite, and that installed stripped shared libraries are unchanged by the patch, except for libresolv since res_send.c contains assertions whose line numbers are changed by the patch). * resolv/res_send.c (send_vc) [__GNUC_PREREQ (4, 7)]: Make code unconditional. * soft-fp/fmadf4.c [__GNUC_PREREQ (4, 7)]: Likewise. [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * soft-fp/fmasf4.c [__GNUC_PREREQ (4, 7)]: Make code unconditional. [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * soft-fp/fmatf4.c [__GNUC_PREREQ (4, 7)]: Make code unconditional. [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * stdlib/setenv.c [((__GNUC__ << 16) + __GNUC_MINOR__) >= ((4 << 16) + 7)]: Make code unconditional. [!(((__GNUC__ << 16) + __GNUC_MINOR__) >= ((4 << 16) + 7))]: Remove conditional code. * sysdeps/ieee754/dbl-64/e_lgamma_r.c (__ieee754_lgamma_r) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__ieee754_lgamma_r) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/flt-32/e_lgammaf_r.c (__ieee754_lgammaf_r) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__ieee754_lgammaf_r) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-128/k_tanl.c (__kernel_tanl) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__kernel_tanl) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-128ibm/k_tanl.c (__kernel_tanl) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__kernel_tanl) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-96/e_lgammal_r.c (__ieee754_lgammal_r) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__ieee754_lgammal_r) [!__GNUC_PREREQ (4, 7)]: Remove conditional code. * sysdeps/ieee754/ldbl-96/k_tanl.c (__kernel_tanl) [__GNUC_PREREQ (4, 7)]: Make code unconditional. (__kernel_tanl) [!__GNUC_PREREQ (4, 7)]: Remove conditional code.
* Assume that SOCK_CLOEXEC is available and worksFlorian Weimer2015-10-171-45/+4
| | | | | This fixes (harmless) data races when accessing the various __have_sock_cloexec variables.
* Simplify handling of nameserver configuration in resolverAndreas Schwab2015-05-211-94/+70
| | | | | | | Remove use of ext.nsmap member of struct __res_state and always use an identity mapping betwen the nsaddr_list array and the ext.nsaddrs array. The fact that a nameserver has an IPv6 address is signalled by setting nsaddr_list[].sin_family to zero.
* Fix the 'array subscript is above array bounds' warning correctlySiddhesh Poyarekar2014-12-161-1/+7
| | | | | Use DIAG_IGNORE_NEEDS_COMMENT instead since the compiler should have seen that NS never goes beyond MAXNS.
* Fix 'array subscript is above array bounds' warning in res_send.cSiddhesh Poyarekar2014-12-161-1/+1
| | | | | | | | | | I see this warning in my build on F21 x86_64, which seems to be due to a weak check for array bounds. Fixed by making the bounds check stronger. This is not an actual bug since nscount is never set to anything greater than MAXNS. The compiler however does not know this, so we need the stronger bounds check to quieten the compiler.
* resolv: Suppress maybe uninitialized warningStefan Liebler2014-12-121-1/+26
| | | | | | | | | | | In send_vc function at resolv/res_send.c, There is the following warning on some architectures: 'resplen' may be used uninitialized in this function [-Wmaybe-uninitialized] And this is a false positive. This patch suppress the compiler warning.
* Fix invalid file descriptor reuse while sending DNS query (BZ #15946)Andreas Schwab2014-06-031-0/+1
|
* Do not fail if one of the two responses to AF_UNSPEC fails (BZ #14308)Siddhesh Poyarekar2014-04-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [Fixes BZ #14308, #12994, #13651] AF_UNSPEC results in sending two queries in parallel, one for the A record and the other for the AAAA record. If one of these is a referral, then the query fails, which is wrong. It should return at least the one successful response. The fix has two parts. The first part makes the referral fall back to the SERVFAIL path, which results in using the successful response. There is a bug in that path however, due to which the second part is necessary. The bug here is that if the first response is a failure and the second succeeds, __libc_res_nsearch does not detect that and assumes a failure. The case where the first response is a success and the second fails, works correctly. This condition is produced by buggy routers, so here's a crude interposable library that can simulate such a condition. The library overrides the recvfrom syscall and modifies the header of the packet received to reproduce this scenario. It has two key variables: mod_packet and first_error. The mod_packet variable when set to 0, results in odd packets being modified to be a referral. When set to 1, even packets are modified to be a referral. The first_error causes the first response to be a failure so that a domain-appended search is performed to test the second part of the __libc_nsearch fix. The driver for this fix is a simple getaddrinfo program that does an AF_UNSPEC query. I have omitted this since it should be easy to implement. I have tested this on x86_64. The interceptor library source: /* Override recvfrom and modify the header of the first DNS response to make it a referral and reproduce bz #845218. We have to resort to this ugly hack because we cannot make bind return the buggy response of a referral for the AAAA record and an authoritative response for the A record. */ #define _GNU_SOURCE #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> #include <stdio.h> #include <stdbool.h> #include <endian.h> #include <dlfcn.h> #include <stdlib.h> /* Lifted from resolv/arpa/nameser_compat.h. */ typedef struct { unsigned id :16; /*%< query identification number */ #if BYTE_ORDER == BIG_ENDIAN /* fields in third byte */ unsigned qr: 1; /*%< response flag */ unsigned opcode: 4; /*%< purpose of message */ unsigned aa: 1; /*%< authoritive answer */ unsigned tc: 1; /*%< truncated message */ unsigned rd: 1; /*%< recursion desired */ /* fields * in * fourth * byte * */ unsigned ra: 1; /*%< recursion available */ unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ unsigned ad: 1; /*%< authentic data from named */ unsigned cd: 1; /*%< checking disabled by resolver */ unsigned rcode :4; /*%< response code */ #endif #if BYTE_ORDER == LITTLE_ENDIAN || BYTE_ORDER == PDP_ENDIAN /* fields * in * third * byte * */ unsigned rd :1; /*%< recursion desired */ unsigned tc :1; /*%< truncated message */ unsigned aa :1; /*%< authoritive answer */ unsigned opcode :4; /*%< purpose of message */ unsigned qr :1; /*%< response flag */ /* fields * in * fourth * byte * */ unsigned rcode :4; /*%< response code */ unsigned cd: 1; /*%< checking disabled by resolver */ unsigned ad: 1; /*%< authentic data from named */ unsigned unused :1; /*%< unused bits (MBZ as of 4.9.3a3) */ unsigned ra :1; /*%< recursion available */ #endif /* remaining * bytes * */ unsigned qdcount :16; /*%< number of question entries */ unsigned ancount :16; /*%< number of answer entries */ unsigned nscount :16; /*%< number of authority entries */ unsigned arcount :16; /*%< number of resource entries */ } HEADER; static int done = 0; /* Packets to modify. 0 for the odd packets and 1 for even packets. */ static const int mod_packet = 0; /* Set to true if the first request should result in an error, resulting in a search query. */ static bool first_error = true; static ssize_t (*real_recvfrom) (int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen); void __attribute__ ((constructor)) init (void) { real_recvfrom = dlsym (RTLD_NEXT, "recvfrom"); if (real_recvfrom == NULL) { printf ("Failed to get reference to recvfrom: %s\n", dlerror ()); printf ("Cannot simulate test\n"); abort (); } } /* Modify the second packet that we receive to set the header in a manner as to reproduce BZ #845218. */ static void mod_buf (HEADER *h, int port) { if (done % 2 == mod_packet || (first_error && done == 1)) { printf ("(Modifying header)"); if (first_error && done == 1) h->rcode = 3; else h->rcode = 0; /* NOERROR == 0. */ h->ancount = 0; h->aa = 0; h->ra = 0; h->arcount = 0; } done++; } ssize_t recvfrom (int sockfd, void *buf, size_t len, int flags, struct sockaddr *src_addr, socklen_t *addrlen) { ssize_t ret = real_recvfrom (sockfd, buf, len, flags, src_addr, addrlen); int port = htons (((struct sockaddr_in *) src_addr)->sin_port); struct in_addr addr = ((struct sockaddr_in *) src_addr)->sin_addr; const char *host = inet_ntoa (addr); printf ("\n*** From %s:%d: ", host, port); mod_buf (buf, port); printf ("returned %zd\n", ret); return ret; }
* Define _STRING_ARCH_unaligned unconditionallyAdhemerval Zanella2014-04-091-2/+2
| | | | | | | This patch defines _STRING_ARCH_unaligned to 0 on default bits/string.h header to avoid undefined compiler warnings on platforms that do not define it. It also make adjustments in code where tests checked if macro existed or not.
* Properly fix memory leak in _nss_dns_gethostbyname4_r with big DNS answerAndreas Schwab2014-02-191-8/+13
| | | | | Instead of trying to guess whether the second buffer needs to be freed set a flag at the place it is allocated
* Use glibc_likely instead __builtin_expect.Ondřej Bílka2014-02-101-18/+18
|
* Correctly copy resolver address. Fixes bug #13028.Ondřej Bílka2013-10-141-1/+1
|
* Don't try to use ioctl unless [FIONREAD].Roland McGrath2013-08-271-1/+4
|
* Fix typos.Ondřej Bílka2013-08-211-1/+1
|
* Remove lots of inline keywords.Roland McGrath2013-02-071-2/+2
|
* Add recvmmsg and sendmmsg to the generic glibc API.Thomas Schwinge2012-11-201-1/+1
|
* Better error handling for sendmmsg use in res_sendUlrich Drepper2012-03-301-5/+7
|
* Correct check for DNS request send successUlrich Drepper2012-03-301-1/+1
| | | | | | This predates the sendmmsg use. The two requests can use different request sizes but the check for successful transfer always only used buflen.
* Speed up DNS by avoiding a system call if possibleUlrich Drepper2012-03-301-17/+83
|
* Fix typo in recent resolver change which causes segvsUlrich Drepper2011-06-151-2/+2
|
* Handle DNS server failures in case of AF_UNSPEC lookups correctlyUlrich Drepper2011-05-301-4/+8
|
* Fix debug statements in resolverAndreas Schwab2010-03-171-7/+10
|
* Fix DEBUG statements in resolv/res_send.cYann Droneaud2010-03-051-19/+20
|
* Always use IPv4 sockets for IPv4 addresses.Ulrich Drepper2010-01-141-35/+9
|
* Initialize local variable in resolver.Ulrich Drepper2009-10-291-1/+2
| | | | | When the DNS server doesn't reply at all we possibly tested an unitialized variable.
* Fix mixing IPv4 and IPv6 name server in resolv.conf.Petar Bogdanovic2009-10-291-26/+26
|
* Handle SERVFAIL, NOTIMP, REFUSED replies from DNS server better.Ulrich Drepper2009-07-261-5/+1
| | | | | When doing IPv4+6 lookups we have to pass up the error record from send_dg.
* Implement second fallback mode for DNS requests.Ulrich Drepper2009-06-261-19/+49
| | | | | | | | | | | | There is some more shardware/software out there which has problems if two DNS requests are sent using the same tuple (source addr, source port, dest addr, dest port) This can range from firewalls to load balancers. Some of the vendors already fixed it in response to this problem. Still, we need a way to make glibc work with broken environments. The single-request-reopen flag can be used or we fall back automatically to this mode.
* Remember we switched to single-request mode.Ulrich Drepper2009-06-111-1/+2
| | | | | This change prevents repetition in most later calls of the resolver in case the DNS server or the network connection is broken.
* (send_dg): Don't just ignore the result we got in case we only receive one ↵Ulrich Drepper2009-04-161-6/+10
| | | | reply in single-request mode.