You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the syslog source driver is used with the transport(proxied-tcp) option, the frame send inside the message(s) gets ignored, and each line will count as a new log message.
Hovewer when the same message is received, but with a source with the transport(tcp) instead, the frame inside the message(s) are processed and the received message(s) have the correct length.
Steps to reproduce
Copy the configuration and start syslog-ng with it
Make sure that the following two file exist and the previously started syslog-ng can write them: /tmp/syslog_proxied.log/tmp/syslog_tcp.log
Create an example payload for loggen to send using the following command in /bin/sh: echo "25 This is the first message26 This is the second message" > ./payload
Send the file to syslog-ng using the following commands:
Send it to the source with transport(proxied-tcp): loggen -S -i --file-read-file=$(pwd)/payload -d --proxied --proxy-src-ip=10.10.10.14 --proxy-dst-ip=10.10.10.236 --proxy-src-port=20000 --proxy-dst-port=4514 localhost 40200
Send it to the source with transport(tcp): loggen -S -i --file-read-file=$(pwd)/payload -d localhost 40100
After the steps above:
tmp/syslog_proxied.log will contain the following lines:
Mar 23 14:36:52 localhost 25 This is the first message26 This is the second message
tmp/syslog_tcp.log will contain the following lines:
Mar 23 14:36:52 localhost This is the first message
Mar 23 14:36:52 localhost This is the second message
During this syslog-ng logs the followings:
...
[2023-03-23T14:36:41.902450] Module loaded and initialized successfully; module='syslogformat'
[2023-03-23T14:36:41.902511] Accepting connections; addr='AF_INET(0.0.0.0:40100)'
[2023-03-23T14:36:41.902553] Accepting connections; addr='AF_INET(0.0.0.0:40200)'
[2023-03-23T14:36:41.902707] Running application hooks; hook='1'
[2023-03-23T14:36:41.902712] Running application hooks; hook='9'
[2023-03-23T14:36:41.902932] syslog-ng starting up; version='4.0.1.486.g0c9d249'
[2023-03-23T14:36:41.902939] Running application hooks; hook='2'
[2023-03-23T14:36:52.066143] Initializing PROXY protocol source driver; driver='0x565520772e30'
[2023-03-23T14:36:52.066395] Syslog connection accepted; fd='15', client='AF_INET(127.0.0.1:55846)', local='AF_INET(0.0.0.0:40200)'
[2023-03-23T14:36:52.066733] PROXY header params; params='10.10.10.14 10.10.10.236 20000 4514'
[2023-03-23T14:36:52.066798] PROXY protocol header received; version='1', header='PROXY TCP4 10.10.10.14 10.10.10.236 20000 4514'
[2023-03-23T14:36:52.067037] Incoming log entry; input='25 This is the first message26 This is the second message', msg='0x7fb7000015d0', rcptid='0'
[2023-03-23T14:36:52.068077] Initializing destination file writer; template='/tmp/syslog_proxied.log', filename='/tmp/syslog_proxied.log', symlink_as='(null)'
[2023-03-23T14:36:52.068527] Syslog connection closed; fd='15', client='AF_INET(127.0.0.1:55846)', local='AF_INET(0.0.0.0:40200)'
[2023-03-23T14:36:52.068576] Freeing PROXY protocol source driver; driver='0x565520772e30'
[2023-03-23T14:36:52.068951] Outgoing message; message='Mar 23 14:36:52 localhost 25 This is the first message26 This is the second message\x0a'
[2023-03-23T14:36:52.589620] Syslog connection accepted; fd='15', client='AF_INET(127.0.0.1:59872)', local='AF_INET(0.0.0.0:40100)'
[2023-03-23T14:36:52.589941] Incoming log entry; input='This is the first message', msg='0x7fb7000015d0', rcptid='0'
[2023-03-23T14:36:52.590263] Initializing destination file writer; template='/tmp/syslog_tcp.log', filename='/tmp/syslog_tcp.log', symlink_as='(null)'
[2023-03-23T14:36:52.590508] Incoming log entry; input='This is the second message', msg='0x7fb700002b10', rcptid='0'
[2023-03-23T14:36:52.590573] Invalid frame header; header=''
[2023-03-23T14:36:52.590651] Syslog connection closed; fd='15', client='AF_INET(127.0.0.1:59872)', local='AF_INET(0.0.0.0:40100)'
[2023-03-23T14:36:52.590905] Outgoing message; message='Mar 23 14:36:52 localhost This is the first message\x0a'
[2023-03-23T14:36:52.590940] Outgoing message; message='Mar 23 14:36:52 localhost This is the second message\x0a'
^C[2023-03-23T14:36:58.030002] Running application hooks; hook='3'
[2023-03-23T14:36:58.030034] syslog-ng shutting down; version='4.0.1.486.g0c9d249'
[2023-03-23T14:36:58.131577] Running application hooks; hook='4'
syslog-ng
Version of syslog-ng
4.1.1 - 0c9d249
Issue
Failure
When the
syslog
source driver is used with thetransport(proxied-tcp)
option, the frame send inside the message(s) gets ignored, and each line will count as a new log message.Hovewer when the same message is received, but with a source with the
transport(tcp)
instead, the frame inside the message(s) are processed and the received message(s) have the correct length.Steps to reproduce
/tmp/syslog_proxied.log
/tmp/syslog_tcp.log
echo "25 This is the first message26 This is the second message" > ./payload
After the steps above:
tmp/syslog_proxied.log
will contain the following lines:tmp/syslog_tcp.log
will contain the following lines:During this syslog-ng logs the followings:
Configuration
The text was updated successfully, but these errors were encountered: