]> git.ipfire.org Git - thirdparty/util-linux.git/commit
logger: bugfix: tcp syslog framing is broken, -T unusable
authorRainer Gerhards <rgerhards@adiscon.com>
Fri, 6 Mar 2015 11:12:15 +0000 (12:12 +0100)
committerRainer Gerhards <rgerhards@adiscon.com>
Fri, 6 Mar 2015 11:12:15 +0000 (12:12 +0100)
commit940a14a3515a0d8cddb338605e788315565fd6cc
tree9e98dba84132b0b84755f91d7ee973f626f59784
parent4be843064c700fb28cab869893c3d19392c4938d
logger: bugfix: tcp syslog framing is broken, -T unusable

Logger can send via plain tcp syslog if -n -T options are given.
However, the framing is broken so that a syslog receiver can not
know where the first message ends and the next one starts. It
actually looks like no framing at all is used. Plain TCP syslog
framing is described in RFC6587.

This patch adds RFC6587 octet-stuffed framing to TCP syslog. For
local logging, this is always fine, for remote logging this is
NOT recommended by the IETF (the RFC is historic). However, a
full blown RFC5425 TLS sender seems to be out of scope for a tool
like logger IMO.

This patch also refactors the way output is written, seperating
the message format generators from the output writer.
misc-utils/logger.c