]> 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)
committerKarel Zak <kzak@redhat.com>
Thu, 12 Mar 2015 09:18:15 +0000 (10:18 +0100)
commit48bc4fd2a8535d71b72b01875ec0038c6b331f8b
treebeff0e7e5ce1709c74711b418d821bae7bbc550d
parentf52c992874e8461b4c121dc8f0573f73b88ddec6
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