diff options
author | simon <simon@FreeBSD.org> | 2007-07-24 13:06:08 +0000 |
---|---|---|
committer | simon <simon@FreeBSD.org> | 2007-07-24 13:06:08 +0000 |
commit | 976078204273ae9028cb63e4938843e480899380 (patch) | |
tree | a173af3d0e493ca47208dc226edccf5d059a1d97 /lib | |
parent | 90cc29c58cc4a61cd9c1f83244fff9144efdcff5 (diff) | |
download | FreeBSD-src-976078204273ae9028cb63e4938843e480899380.zip FreeBSD-src-976078204273ae9028cb63e4938843e480899380.tar.gz |
Set timeout for all NIS RPC requests to 1 second and not just for
yp_next as revision 1.50 did. This should fix, or at least very much
reduce the risk of, NIS timing out due to UDP packet loss for NIS
functions.
See also revision 1.50 for more details about the general problem.
Tested by: nosedive, freefall, hub, mx1, brooks
MFC after: 1 week
Approved by: re (mux)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libc/yp/yplib.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c index cc0a511..eb5c34c 100644 --- a/lib/libc/yp/yplib.c +++ b/lib/libc/yp/yplib.c @@ -555,6 +555,14 @@ gotit: _ypbindlist = ysd; } + /* + * Set low retry timeout to realistically handle UDP packet + * loss for YP packet bursts. + */ + tv.tv_sec = 1; + tv.tv_usec = 0; + clnt_control(ysd->dom_client, CLSET_RETRY_TIMEOUT, (char*)&tv); + if (ypdb != NULL) *ypdb = ysd; return (0); @@ -823,14 +831,6 @@ again: return (YPERR_DOMAIN); } - /* - * Set low retry timeout to realistically handle UDP packet - * loss for yp_next packet bursts. - */ - tv.tv_sec = 1; - tv.tv_usec = 0; - clnt_control(ysd->dom_client, CLSET_RETRY_TIMEOUT, (char*)&tv); - tv.tv_sec = _yplib_timeout; tv.tv_usec = 0; |