From 441342f4701a4bbc41c24721d4c60b857e1c5d1e Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 19 Jul 2009 15:34:56 +0200 Subject: 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 --- src/run.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/run.c') 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: -- cgit v1.2.3