]> jfr.im git - irc/freenode/ircd-seven.git/commit
BAN: Don't schedule check_klines for 0 seconds in the future.
authorKeith Buck <redacted>
Sun, 17 Aug 2014 09:06:01 +0000 (09:06 +0000)
committerKeith Buck <redacted>
Sun, 17 Aug 2014 09:06:01 +0000 (09:06 +0000)
commit8db50c03e6551cdc794c9b1d54a2c51c4668c370
treebe659cf88b4646fcc202e980a9b085f178a600c4
parent1c38b9def0acf37f081949d44a091c073a41c2ce
BAN: Don't schedule check_klines for 0 seconds in the future.

When receiving bans from a bursting server, if kline_delay is set to 0
(the default), rb_event_addonce will be called to schedule an event for
0 seconds in the future. While this works fine for the fallback
rb_event_run function, the epoll implementation ends up scheduling a
timerfd for the event in the past, which is then never executed.

While fixing this, I also made rb_event_add and rb_event_addonce reject
attempts to add events scheduled for 0 seconds in the future; they're
instead rewritten to run 1 second in the future.
libratbox/src/event.c
modules/core/m_ban.c