summaryrefslogtreecommitdiffstats
path: root/src/run.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-07-19 15:34:56 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2009-07-19 15:34:56 +0200
commit441342f4701a4bbc41c24721d4c60b857e1c5d1e (patch)
tree51c61fb065aa28e8b6e2042511061cb0b93886cd /src/run.c
parent4694ae1e0939f69f4d2696b0caff62ce6a17d92f (diff)
conntrackd: reset event limit iteration counter
With this patch, we reset the event iteration limit counter after we have performed an event handling run. Thus, every run loop always performs a maximum of EventIterationLimit event handling instead of keeping the old credits for the next run loop. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/run.c')
-rw-r--r--src/run.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/run.c b/src/run.c
index 87b6fb2..8a15e14 100644
--- a/src/run.c
+++ b/src/run.c
@@ -466,6 +466,9 @@ static void __run(struct timeval *next_alarm)
/* conntrack event has happened */
if (FD_ISSET(nfct_fd(STATE(event)), &readfds)) {
ret = nfct_catch(STATE(event));
+ /* reset event iteration limit counter */
+ STATE(event_iterations_limit) =
+ CONFIG(event_iterations_limit);
if (ret == -1) {
switch(errno) {
case ENOBUFS: