summaryrefslogtreecommitdiff
path: root/src/run.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2013-09-26 17:53:06 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2013-09-26 18:52:26 +0200
commitecfe6e93016559fdd18013ab5a2e1f200d330310 (patch)
tree7fcfb6fc18626a1cf8864ac821f770d9d5a13a28 /src/run.c
parent0cf75aaf19ffd08e7c63fee737423d01343f4cb9 (diff)
downloadconntrack-tools-ecfe6e93016559fdd18013ab5a2e1f200d330310.tar.gz
conntrack-tools-ecfe6e93016559fdd18013ab5a2e1f200d330310.zip
build: add --disable-cthelper and --disable-cttimeout
This patch allows you to disable userspace helper support and conntrack timeout tuning at build stage. By default, both features are enabled, to avoid breaking backward compatibility. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/run.c')
-rw-r--r--src/run.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/run.c b/src/run.c
index 7fa6889..a9d4862 100644
--- a/src/run.c
+++ b/src/run.c
@@ -55,9 +55,10 @@ void killer(int signo)
if (CONFIG(flags) & (CTD_SYNC_MODE | CTD_STATS_MODE))
ctnl_kill();
+#ifdef BUILD_CTHELPER
if (CONFIG(flags) & CTD_HELPER)
cthelper_kill();
-
+#endif
destroy_fds(STATE(fds));
unlink(CONFIG(lockfile));
dlog(LOG_NOTICE, "---- shutdown received ----");
@@ -205,9 +206,10 @@ static int local_handler(int fd, void *data)
if (CONFIG(flags) & (CTD_SYNC_MODE | CTD_STATS_MODE))
return ctnl_local(fd, type, data);
+#ifdef BUILD_CTHELPER
if (CONFIG(flags) & CTD_HELPER)
return cthelper_local(fd, type, data);
-
+#endif
return ret;
}
@@ -259,11 +261,12 @@ init(void)
if (ctnl_init() < 0)
return -1;
+#ifdef BUILD_CTHELPER
if (CONFIG(flags) & CTD_HELPER) {
if (cthelper_init() < 0)
return -1;
}
-
+#endif
time(&STATE(stats).daemon_start_time);
dlog(LOG_NOTICE, "initialization completed");