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)
This commit is contained in:
parent
9a0e6be26a
commit
33e6f9c10c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=171563
@ -555,6 +555,14 @@ _yp_dobind(char *dom, struct dom_binding **ypdb)
|
||||
_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 @@ yp_next(char *indomain, char *inmap, char *inkey, int inkeylen,
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user