summaryrefslogtreecommitdiffstats
path: root/src/run.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2009-02-08 19:13:22 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2009-02-08 19:13:22 +0100
commitf3464ea99081fbe4f429f030ea99c60e2338c047 (patch)
treeb33666b18749ca5c92333bc7caac38c2bba3f924 /src/run.c
parentba2f8458ecfa0827e09a1c40c9e29868239fafa1 (diff)
netlink: add new option NetlinkOverrunResync
This patch adds NetlinkOverrunResync. This option can be used to set the amount of time after which the daemon resynchronizes itself with the kernel state-table if it detects a Netlink overrun. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/run.c')
-rw-r--r--src/run.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/run.c b/src/run.c
index 81f2590..5c2a3e7 100644
--- a/src/run.c
+++ b/src/run.c
@@ -417,9 +417,6 @@ init(void)
return 0;
}
-/* interval of 30s. for between two overrun */
-#define OVRUN_INT 30
-
static void __run(struct timeval *next_alarm)
{
int ret;
@@ -475,7 +472,10 @@ static void __run(struct timeval *next_alarm)
* we resync ourselves.
*/
nl_resize_socket_buffer(STATE(event));
- add_alarm(&STATE(resync_alarm), OVRUN_INT, 0);
+ if (CONFIG(nl_overrun_resync) > 0) {
+ add_alarm(&STATE(resync_alarm),
+ CONFIG(nl_overrun_resync),0);
+ }
STATE(stats).nl_catch_event_failed++;
STATE(stats).nl_overrun++;
break;