summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArturo Borrero Gonzalez <arturo@netfilter.org>2018-04-16 19:28:44 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2018-04-18 15:57:40 +0200
commitf75fcf21e17c8f490e34bed45d935bd1e13c9b7f (patch)
treec83092cfb919c5f6d19c007eee7feec57fd3c76c
parentee640bcddf2f478ea00e96a695ff84cb4cd69574 (diff)
systemd: default to use libsystemd if build with support for it
We may assume that if an user does build conntrackd with such feature, is with the intention to use it. So, if that's the case, default to use it. This eases some downstream use cases when dealing with default configs to be shipped to final users. This could be a mid-point solution, given some users are asking for a full revert of commit c01d0d9138112ec95ee316385ea2687dd94fa4e3. Signed-off-by: Arturo Borrero Gonzalez <arturo@netfilter.org> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--conntrackd.85
-rw-r--r--conntrackd.conf.57
-rw-r--r--doc/stats/conntrackd.conf2
-rw-r--r--doc/sync/alarm/conntrackd.conf2
-rw-r--r--doc/sync/ftfw/conntrackd.conf2
-rw-r--r--doc/sync/notrack/conntrackd.conf2
-rw-r--r--src/read_config_yy.y4
7 files changed, 13 insertions, 11 deletions
diff --git a/conntrackd.8 b/conntrackd.8
index 6ccf261..de1e80c 100644
--- a/conntrackd.8
+++ b/conntrackd.8
@@ -1,4 +1,4 @@
-.TH CONNTRACKD 8 "Aug 30, 2016" "" ""
+.TH CONNTRACKD 8 "Apr 16, 2018" "" ""
.\" Man page written by Pablo Neira Ayuso <pablo@netfilter.org> (Dec 2007)
@@ -149,9 +149,6 @@ the configuration file, ignore this notice.
Starting with the 1.4.4 release, \fBconntrackd\fP includes integration with
\fBsystemd(1)\fP to use an unit file of \fIType=notify\fP and watchdog support.
-The daemon should be configured at build time to include such support
-and \fBconntrackd.conf(5)\fP should contain \fBSystemd on\fP.
-
.SH INCOMPATIBILITIES
During the 0.9.9 development, some important changes in the replication message
format were introduced. Therefore, \fBconntrackd\fP >= 0.9.9 will not work
diff --git a/conntrackd.conf.5 b/conntrackd.conf.5
index 7c5c29f..79a5bba 100644
--- a/conntrackd.conf.5
+++ b/conntrackd.conf.5
@@ -1,5 +1,5 @@
.\"
-.\" (C) Copyright 2015, Arturo Borrero Gonzalez <arturo@debian.org>
+.\" (C) Copyright 2015-2018, Arturo Borrero Gonzalez <arturo@netfilter.org>
.\"
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
.\" This is free documentation; you can redistribute it and/or
@@ -22,7 +22,7 @@
.\" <http://www.gnu.org/licenses/>.
.\" %%%LICENSE_END
.\"
-.TH CONNTRACKD.CONF 5 "January 24, 2018"
+.TH CONNTRACKD.CONF 5 "Apr 16, 2018"
.SH NAME
conntrackd.conf \- configuration file for conntrackd daemon
@@ -476,7 +476,8 @@ Note: \fBsystemd(1)\fP watchdog is supported as well.
Example: Systemd on
-By default runtime support is disabled.
+By default runtime support is enabled if conntrackd was built with the systemd
+feature. Otherwise is off.
.TP
.BI "Nice <value>"
diff --git a/doc/stats/conntrackd.conf b/doc/stats/conntrackd.conf
index ba957a1..9918bbb 100644
--- a/doc/stats/conntrackd.conf
+++ b/doc/stats/conntrackd.conf
@@ -6,7 +6,7 @@ General {
# Enable systemd support. If conntrackd is compiled with the proper
# configuration, you can use a systemd service unit of Type=notify
# and use conntrackd with systemd watchdog as well.
- # Default is: off
+ # Default is: on if built with --enable-systemd, off otherwhise
#
#Systemd on
diff --git a/doc/sync/alarm/conntrackd.conf b/doc/sync/alarm/conntrackd.conf
index 831be15..b689ae6 100644
--- a/doc/sync/alarm/conntrackd.conf
+++ b/doc/sync/alarm/conntrackd.conf
@@ -221,7 +221,7 @@ General {
# Enable systemd support. If conntrackd is compiled with the proper
# configuration, you can use a systemd service unit of Type=notify
# and use conntrackd with systemd watchdog as well.
- # Default is: off
+ # Default is: on if built using --enable-systemd, off otherwhise
#
#Systemd on
diff --git a/doc/sync/ftfw/conntrackd.conf b/doc/sync/ftfw/conntrackd.conf
index 9da0fb6..8267659 100644
--- a/doc/sync/ftfw/conntrackd.conf
+++ b/doc/sync/ftfw/conntrackd.conf
@@ -244,7 +244,7 @@ General {
# Enable systemd support. If conntrackd is compiled with the proper
# configuration, you can use a systemd service unit of Type=notify
# and use conntrackd with systemd watchdog as well.
- # Default is: off
+ # Default is: on if built with --enable-systemd, off otherwhise
#
#Systemd on
diff --git a/doc/sync/notrack/conntrackd.conf b/doc/sync/notrack/conntrackd.conf
index 600fc89..8445b7d 100644
--- a/doc/sync/notrack/conntrackd.conf
+++ b/doc/sync/notrack/conntrackd.conf
@@ -283,7 +283,7 @@ General {
# Enable systemd support. If conntrackd is compiled with the proper
# configuration, you can use a systemd service unit of Type=notify
# and use conntrackd with systemd watchdog as well.
- # Default is: off
+ # Default is: on if built with --enable-systemd, off otherwhise
#
#Systemd on
diff --git a/src/read_config_yy.y b/src/read_config_yy.y
index 32cca3c..6de8c6c 100644
--- a/src/read_config_yy.y
+++ b/src/read_config_yy.y
@@ -1626,6 +1626,10 @@ init_config(char *filename)
CONFIG(stats).syslog_facility = -1;
CONFIG(netlink).subsys_id = -1;
+#ifdef BUILD_SYSTEMD
+ CONFIG(systemd) = 1;
+#endif /* BUILD_SYSTEMD */
+
/* Initialize list of user-space helpers */
INIT_LIST_HEAD(&CONFIG(cthelper).list);