mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 15:00:12 +00:00
institute afsdb dns lookup timeout if we can
don't be willing to wait more than about an rx timeout period for afsdb retries. Change-Id: Idca642ff7abe6b9233c7501b0f06fd353567bb04 Reviewed-on: http://gerrit.openafs.org/1407 Tested-by: Derrick Brashear <shadow@dementia.org> Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
parent
d24078658d
commit
fb79f12658
@ -1185,6 +1185,8 @@ else
|
||||
|
||||
fi
|
||||
|
||||
AC_CHECK_RESOLV_RETRANS
|
||||
|
||||
AC_CACHE_VAL(ac_cv_setsockopt_iprecverr,
|
||||
[
|
||||
AC_MSG_CHECKING([for setsockopt(, SOL_IP, IP_RECVERR)])
|
||||
|
@ -1027,6 +1027,18 @@ afsconf_LookupServer(const char *service, const char *protocol,
|
||||
if (!dotcellname)
|
||||
return AFSCONF_NOTFOUND; /* service not found */
|
||||
|
||||
#ifdef HAVE_RES_RETRANSRETRY
|
||||
if ((_res.options & RES_INIT) == 0 && res_init() == -1)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* Rx timeout is typically 56 seconds; limit user experience to
|
||||
* similar timeout
|
||||
*/
|
||||
_res.retrans = 18;
|
||||
_res.retry = 3;
|
||||
#endif
|
||||
|
||||
retryafsdb:
|
||||
switch (pass) {
|
||||
case 0:
|
||||
|
@ -1,3 +1,26 @@
|
||||
AC_DEFUN([AC_CHECK_RESOLV_RETRANS],[
|
||||
AC_CACHE_CHECK([for retransmit support in res_state], [ac_cv_res_retransretry],[
|
||||
AC_TRY_RUN( [
|
||||
#include <sys/types.h>
|
||||
#if defined(__sun__)
|
||||
#include <inet/ip.h>
|
||||
#endif
|
||||
#include <resolv.h>
|
||||
int main(void) {
|
||||
_res.retrans = 2;
|
||||
_res.retry = 1;
|
||||
exit(0);
|
||||
}
|
||||
],[
|
||||
ac_cv_res_retransretry=1
|
||||
],[
|
||||
ac_cv_res_retransretry=
|
||||
],[
|
||||
ac_cv_res_retransretry="no"
|
||||
])])
|
||||
AC_DEFINE_UNQUOTED([HAVE_RES_RETRANSRETRY], [$ac_cv_res_retransretry], [Define if resolv.h's res_state has the fields retrans/rety])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_FUNC_RES_SEARCH], [
|
||||
ac_cv_func_res_search=no
|
||||
AC_TRY_LINK([
|
||||
|
Loading…
Reference in New Issue
Block a user