Skip to contentSkip to conversation

conntrackd: Disable systemd support by default

PATCH In review Pablo Neira Ayuso 2 participants 3 messages Feb 16, 2016 – Feb 17, 2016 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/1 conntrackd: Disable systemd support by default

By default, conntrackd is compiled with no built-in systemd support. This patch updates the default runtime behaviour to be consistent with what ./configure provides by default.

Thus, users should explicitly indicate "Systemd On" in their configuration file to enable this.

---
 conntrackd.conf.5                | 4 ++--
 doc/stats/conntrackd.conf        | 4 ++--
 doc/sync/alarm/conntrackd.conf   | 4 ++--
 doc/sync/ftfw/conntrackd.conf    | 4 ++--
 doc/sync/notrack/conntrackd.conf | 4 ++--
 src/read_config_yy.y             | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)
conntrackd.conf.5 +2 -2
index 4781825..ed387b9 100644
@@ -457,9 +457,9 @@ Obviusly, this requires the init systemd of your system to be \fBsystemd(1)\fP.
 
 Note: \fBsystemd(1)\fP watchdog is supported as well.
 
-Example: Systemd off
+Example: Systemd on
 
-By default runtime support is activated.
+By default runtime support is disabled.
 
 .TP
 .BI "Nice <value>"
doc/stats/conntrackd.conf +2 -2
index b1cca07..6a9aec8 100644
@@ -6,9 +6,9 @@ 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: on
+	# Default is: off
 	#
-	#Systemd off
+	#Systemd on
 
 	#
 	# Set the nice value of the daemon. This value goes from -20
doc/sync/alarm/conntrackd.conf +2 -2
index 39deb47..225d1c9 100644
@@ -221,9 +221,9 @@ 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: on
+	# Default is: off
 	#
-	#Systemd off
+	#Systemd on
 
 	#
 	# Set the nice value of the daemon, this value goes from -20
doc/sync/ftfw/conntrackd.conf +2 -2
index 60d7d97..228674c 100644
@@ -244,9 +244,9 @@ 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: on
+	# Default is: off
 	#
-	#Systemd off
+	#Systemd on
 
 	#
 	# Set the nice value of the daemon, this value goes from -20
doc/sync/notrack/conntrackd.conf +2 -2
index b9d42ba..3becd91 100644
@@ -283,9 +283,9 @@ 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: on
+	# Default is: off
 	#
-	#Systemd off
+	#Systemd on
 
 	#
 	# Set the nice value of the daemon, this value goes from -20
src/read_config_yy.y +2 -2
index 58ad2d0..6052390 100644
@@ -1864,8 +1864,8 @@ init_config(char *filename)
 	CONFIG(stats).syslog_facility = -1;
 	CONFIG(netlink).subsys_id = -1;
 
-	/* enable systemd by default */
-	CONFIG(systemd) = 1;
+	/* disable systemd by default */
+	CONFIG(systemd) = 0;
 
 	/* Initialize list of user-space helpers */
 	INIT_LIST_HEAD(&CONFIG(cthelper).list);
Signature · 1 line
2.1.4
Acked-by on v1 1/1
#1 lore raw
Quoted 17 lines · Pablo Neira Ayuso

By default, conntrackd is compiled with no built-in systemd support. This patch updates the default runtime behaviour to be consistent with what ./configure provides by default.

Thus, users should explicitly indicate "Systemd On" in their configuration file to enable this.

---
 conntrackd.conf.5                | 4 ++--
 doc/stats/conntrackd.conf        | 4 ++--
 doc/sync/alarm/conntrackd.conf   | 4 ++--
 doc/sync/ftfw/conntrackd.conf    | 4 ++--
 doc/sync/notrack/conntrackd.conf | 4 ++--
 src/read_config_yy.y             | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

[...]

Quoted 5 lines
src/read_config_yy.y +0 -0
index 58ad2d0..6052390 100644

src/read_config_yy.y init_config(char *filename) · line 1871

Quoted 10 lines
src/read_config_yy.y +2 -2
@@ -1864,8 +1864,8 @@ init_config(char *filename)
        CONFIG(stats).syslog_facility = -1;
        CONFIG(netlink).subsys_id = -1;
 
-       /* enable systemd by default */
-       CONFIG(systemd) = 1;
+       /* disable systemd by default */
+       CONFIG(systemd) = 0;
 
        /* Initialize list of user-space helpers */
        INIT_LIST_HEAD(&CONFIG(cthelper).list);

If we change this logic, there are a parser rules that need changes as well.

[...]
systemd: T_SYSTEMD T_ON { /* already enabled in init_config() */ };
systemd: T_SYSTEMD T_OFF

{
     conf.systemd = 0;
};

[...]

I agree with the patch, so

Signature · 5 lines
Arturo Borrero González
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
author maintainer
#2 lore raw
Quoted 37 lines · Arturo Borrero Gonzalez
Quoted 17 lines · Pablo Neira Ayuso

By default, conntrackd is compiled with no built-in systemd support. This patch updates the default runtime behaviour to be consistent with what ./configure provides by default.

Thus, users should explicitly indicate "Systemd On" in their configuration file to enable this.

---
 conntrackd.conf.5                | 4 ++--
 doc/stats/conntrackd.conf        | 4 ++--
 doc/sync/alarm/conntrackd.conf   | 4 ++--
 doc/sync/ftfw/conntrackd.conf    | 4 ++--
 doc/sync/notrack/conntrackd.conf | 4 ++--
 src/read_config_yy.y             | 4 ++--
 6 files changed, 12 insertions(+), 12 deletions(-)

[...]

Quoted 5 lines
src/read_config_yy.y +0 -0
index 58ad2d0..6052390 100644

src/read_config_yy.y init_config(char *filename) · line 1871

Quoted 10 lines
src/read_config_yy.y +2 -2
@@ -1864,8 +1864,8 @@ init_config(char *filename)
        CONFIG(stats).syslog_facility = -1;
        CONFIG(netlink).subsys_id = -1;
 
-       /* enable systemd by default */
-       CONFIG(systemd) = 1;
+       /* disable systemd by default */
+       CONFIG(systemd) = 0;
 
        /* Initialize list of user-space helpers */
        INIT_LIST_HEAD(&CONFIG(cthelper).list);

If we change this logic, there are a parser rules that need changes as well.

Quoted 6 lines

[...]
systemd: T_SYSTEMD T_ON { /* already enabled in init_config() */ };
systemd: T_SYSTEMD T_OFF

{
     conf.systemd = 0;
};

I'll fix this, we should anyway explicitly set on/off this based on what the parser sees, ie.

systemd: T_SYSTEMD T_ON { conf.systemd = 1; };
systemd: T_SYSTEMD T_OFF { conf.systemd = 0; };

And remove the default setting to zero, it's not required.

Quoted 5 lines

[...]

I agree with the patch, so

Will send a v2 including this. Thanks.