mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 11:18:43 +00:00
Merge pull request #476 from qlyoung/abort-select-fd
lib: abort if fd >= FD_SETSIZE and using select
This commit is contained in:
commit
af95eb8755
@ -786,6 +786,12 @@ funcname_thread_add_read_write (int dir, struct thread_master *m,
|
|||||||
#if defined (HAVE_POLL)
|
#if defined (HAVE_POLL)
|
||||||
thread = generic_thread_add(m, func, arg, fd, dir, debugargpass);
|
thread = generic_thread_add(m, func, arg, fd, dir, debugargpass);
|
||||||
#else
|
#else
|
||||||
|
if (fd >= FD_SETSIZE)
|
||||||
|
{
|
||||||
|
zlog_err ("File descriptor %d is >= FD_SETSIZE (%d). Please recompile"
|
||||||
|
"with --enable-poll=yes", fd, FD_SETSIZE);
|
||||||
|
assert (fd < FD_SETSIZE && !"fd >= FD_SETSIZE");
|
||||||
|
}
|
||||||
thread_fd_set *fdset = NULL;
|
thread_fd_set *fdset = NULL;
|
||||||
if (dir == THREAD_READ)
|
if (dir == THREAD_READ)
|
||||||
fdset = &m->handler.readfd;
|
fdset = &m->handler.readfd;
|
||||||
|
Loading…
Reference in New Issue
Block a user