opnsense-src/lib/libc
Nate Lawson 1cc11684ac MFdragonfly: resolver fix for timeouts on unqualified hostnames
res_search only incremented got_servfail for h_errno == TRY_AGAIN *AND*
  hp->rcode == SERVFAIL.  However, there are cases such as timeouts where
  rcode is not always set to SERVFAIL.  This leads to inconsistent nameserver
  operation during multi-domain and truncated dot searches, especially during
  booting when portions of the network are being brought up simultanious with
  dns lookups.

  This patch attempts to correct the problem by unconditionally terminating
  the search if TRY_AGAIN is returned (after res_query has gone through all
  retries and name servers) instead of trying other domain elements in the
  domain seach path.

  This patch should fix reported problems (which I can reproduce) with some
  NFS mounts failing during boot.  This occured because mount_nfs thought the
  host name lookup returned a definitive failure using a non-dotted host name
  when, in fact, it timed out on the first part (host.search.domain.name) and
  got a definitive host-not-found response on the second part (host.).

  Generally speaking, search path name server timeouts can exceed 60 seconds
  per element and most machines which consistently timeout on earlier portions
  of a search path are effectively non-operational due to the imposed delays.
  It is more important for DNS lookups to return the proper error code then
  to be able to recover a valid lookup in later portions of the search path
  in these situations.

Obtained from:	DragonFly
MFC after:	3 weeks
2004-04-21 00:56:38 +00:00
..
alpha Use unions to avoid violating C99 strict aliasing rules. 2004-03-16 20:42:02 +00:00
amd64 Fix Yet Another 16 byte stack alignment bug. Thankfully, this one is 2004-03-31 07:27:31 +00:00
compat-43 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
db Simplify mpool_get() and mpool_write() by using pread() and pwrite() 2004-01-20 00:40:35 +00:00
gdtoa Updated manh shift constant type to 'ULL' for PPC to fix 2004-01-21 04:51:50 +00:00
gen Belatedly remove the getvfsent(3) API. All the consumers have been 2004-04-11 21:36:31 +00:00
gmon Use ANSI C function definition for _mcount' and remove static' 2004-01-06 18:49:54 +00:00
i386 Remove the code and an associated comment for gcc 1.x compatibility 2004-02-16 10:03:02 +00:00
ia64 Fix some aliasing problems. 2004-02-16 10:02:40 +00:00
include When a dynamic NSS module is built and linked against a thread 2004-03-30 15:56:15 +00:00
locale Perform some basic validation of multibyte conversion state objects. 2004-04-12 13:09:18 +00:00
net MFdragonfly: resolver fix for timeouts on unqualified hostnames 2004-04-21 00:56:38 +00:00
nls Remove incomplete support for running FreeBSD userland on old NetBSD kernels 2003-10-29 10:45:01 +00:00
posix1e Adjust for brain outage that affected the previous commit. 2004-01-06 20:29:40 +00:00
powerpc makecontext lib call. 2004-03-02 06:22:24 +00:00
quad libc_r wasn't so tied to libc for 22 months. 2002-11-18 09:50:57 +00:00
regex mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
rpc Make NULL a (void*)0 whereever possible, and fix the warnings(-Werror) 2004-03-05 08:10:19 +00:00
sparc64 Use unions to avoid violating C99 strict aliasing rules. 2004-03-16 20:42:02 +00:00
stdio Prepare to handle trivial state-dependent encodings. Full support for 2004-04-07 09:55:05 +00:00
stdlib Simplify one condition in prev. commit: 2004-04-01 22:32:28 +00:00
stdtime Detect range errors when using the %s specifier. Previously, LONG_MAX 2003-11-17 04:19:15 +00:00
string Prepare to handle state-dependent encodings. This mainly involves not 2004-04-07 09:47:56 +00:00
sys Add mention of the fact that timeouts are silently limited to 24 hours. 2004-04-20 21:07:43 +00:00
uuid Remove stale DCE 1.1 pointers to the IBM site. The URLs aren't valid 2003-08-08 19:18:43 +00:00
xdr When writing/reading longs use explicit 32bit temporary values. 2004-01-24 01:23:30 +00:00
yp Back out the `hiding' of strlcpy and strlcat. Several people 2003-05-01 19:03:14 +00:00
Makefile libc is now WARNS=2 clean with the exception of the gdtoa bits (which 2004-01-19 16:16:53 +00:00