aboutgitcodebugslistschat
path: root/flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'flow.c')
-rw-r--r--flow.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/flow.c b/flow.c
index 8d72965..4f53486 100644
--- a/flow.c
+++ b/flow.c
@@ -359,7 +359,12 @@ bool flow_in_epoll(const struct flow_common *f)
*/
int flow_epollfd(const struct flow_common *f)
{
- ASSERT(f->epollid < EPOLLFD_ID_MAX);
+ if (f->epollid >= EPOLLFD_ID_MAX) {
+ flow_log_(f, true, LOG_WARNING,
+ "Invalid epollid %i for flow, assuming default",
+ f->epollid);
+ return epoll_id_to_fd[EPOLLFD_ID_DEFAULT];
+ }
return epoll_id_to_fd[f->epollid];
}