summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2025-03-08 21:04:32 +0100
committerChristian Breunig <christian@breunig.cc>2025-03-08 21:04:32 +0100
commit4666bbc2164d9e0104916a5ea5bf2528bf4e1043 (patch)
tree1b9e071d4e5e3500a86ed14ad014cac52a19fba1
parentb12c9ec6db804f8e9494502e0612850c72670fee (diff)
downloadvyos-1x-4666bbc2164d9e0104916a5ea5bf2528bf4e1043.tar.gz
vyos-1x-4666bbc2164d9e0104916a5ea5bf2528bf4e1043.zip
syslog: T7229: advanced format should not have IPv6 addresses in [] brackets
Otherwise rsyslog will report an error: omfwd: could not get addrinfo for hostname '[2001:db8::2]':'514': System error
-rw-r--r--data/templates/rsyslog/rsyslog.conf.j22
-rwxr-xr-xsmoketest/scripts/cli/test_system_syslog.py8
2 files changed, 8 insertions, 2 deletions
diff --git a/data/templates/rsyslog/rsyslog.conf.j2 b/data/templates/rsyslog/rsyslog.conf.j2
index e2ff334ff..68e34f3f8 100644
--- a/data/templates/rsyslog/rsyslog.conf.j2
+++ b/data/templates/rsyslog/rsyslog.conf.j2
@@ -98,7 +98,7 @@ if prifilt("{{ tmp | join(',') }}") then {
action(
type="omfwd"
# Remote syslog server where we send our logs to
- target="{{ remote_name | bracketize_ipv6 }}"
+ target="{{ remote_name }}"
# Port on the remote syslog server
port="{{ remote_options.port }}"
protocol="{{ remote_options.protocol }}"
diff --git a/smoketest/scripts/cli/test_system_syslog.py b/smoketest/scripts/cli/test_system_syslog.py
index e642b5660..b3eb616ee 100755
--- a/smoketest/scripts/cli/test_system_syslog.py
+++ b/smoketest/scripts/cli/test_system_syslog.py
@@ -132,10 +132,16 @@ class TestRSYSLOGService(VyOSUnitTestSHIM.TestCase):
'facility': {'auth' : {'level': 'info'}},
'protocol': 'udp',
},
- '169.254.0.2': {
+ '2001:db8::1': {
+ 'facility': {'all' : {'level': 'debug'}},
'port': '1514',
'protocol': 'udp',
},
+ 'syslog.vyos.net': {
+ 'facility': {'all' : {'level': 'debug'}},
+ 'port': '1515',
+ 'protocol': 'tcp',
+ },
'169.254.0.3': {
'facility': {'auth' : {'level': 'info'},
'kern' : {'level': 'debug'},