Patch from the ISC DHCP CVS repository, fix dhclient problem,
"Re: dhclient still taking up 95% of CPU" in current-users: : Fix for bug #416: If a server hands dhclient an insanely large : lease time, select() can get passed a too-large timeout, causing it : to return EINVAL. This fix restricts the select() timeout to one day.
This commit is contained in:
parent
e3e05b89d4
commit
6a3b366a8c
|
@ -247,6 +247,13 @@ isc_result_t omapi_one_dispatch (omapi_object_t *wo,
|
|||
to.tv_usec += 1000000;
|
||||
to.tv_sec--;
|
||||
}
|
||||
|
||||
/* It is possible for the timeout to get set larger than
|
||||
the largest time select() is willing to accept.
|
||||
Restricting the timeout to a maximum of one day should
|
||||
work around this. -DPN. (Ref: Bug #416) */
|
||||
if (to.tv_sec > (60 * 60 * 24))
|
||||
to.tv_sec = 60 * 60 * 24;
|
||||
}
|
||||
|
||||
/* If the object we're waiting on has reached completion,
|
||||
|
|
Loading…
Reference in New Issue