From 9ba81b263f4e0dd7b5dbf2e766702eedff96538b Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Thu, 7 Nov 2024 22:05:00 +0100 Subject: syslog: T6858: bugfix remote syslog using TCP Commit 042be39cc ("syslog: T5367: add format option to include timezone in message") added an invalid, outer if-statement when rendering the rsyslog configuration option for TCP. Remote hosts only got added when the format option "octet-counting" was defined in addition to the TCP protocol. This has been fix and now TCP transport is decoupled from octet-counting mode. --- data/templates/rsyslog/rsyslog.conf.j2 | 2 -- 1 file changed, 2 deletions(-) (limited to 'data/templates') diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2 index 7fd592d1f..253a4bee2 100644 --- a/data/templates/rsyslog/rsyslog.conf.j2 +++ b/data/templates/rsyslog/rsyslog.conf.j2 @@ -57,9 +57,7 @@ $outchannel {{ file_name }},/var/log/user/{{ file_name }},{{ file_options.archiv {% endfor %} {% endif %} {% if host_options.protocol is vyos_defined('tcp') %} -{% if host_options.format.octet_counted is vyos_defined %} {{ tmp | join(';') }} @@{{ '(o)' if host_options.format.octet_counted is vyos_defined }}{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.format.include_timezone is vyos_defined }} -{% endif %} {% else %} {{ tmp | join(';') }} @{{ host_name | bracketize_ipv6 }}:{{ host_options.port }}{{ ';RSYSLOG_SyslogProtocol23Format' if host_options.format.include_timezone is vyos_defined }} {% endif %} -- cgit v1.2.3