mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
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
1 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue