Skip to content

Commit

Permalink
Merge pull request #15320 from donaldsharp/vtysh_limit_fds
Browse files Browse the repository at this point in the history
lib, ospfclient, vtysh: Allow for a minimum fd poll size
  • Loading branch information
riw777 authored Feb 13, 2024
2 parents 17a0a62 + 729dd6f commit e74c3b0
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,12 @@ struct event_loop *event_master_create(const char *name)
rv->fd_limit = (int)limit.rlim_cur;
}

if (rv->fd_limit > STUPIDLY_LARGE_FD_SIZE)
zlog_warn("FD Limit set: %u is stupidly large. Is this what you intended? Consider using --limit-fds",
rv->fd_limit);
if (rv->fd_limit > STUPIDLY_LARGE_FD_SIZE) {
zlog_warn("FD Limit set: %u is stupidly large. Is this what you intended? Consider using --limit-fds also limiting size to %u",
rv->fd_limit, STUPIDLY_LARGE_FD_SIZE);

rv->fd_limit = STUPIDLY_LARGE_FD_SIZE;
}

rv->read = XCALLOC(MTYPE_EVENT_POLL,
sizeof(struct event *) * rv->fd_limit);
Expand Down

0 comments on commit e74c3b0

Please sign in to comment.