Skip to content

Regarding RFC 5425 compliance (i.e. "Transport Layer Security (TLS) Transport Mapping for Syslog") #231

@cipriancraciun

Description

@cipriancraciun

According to RFC 5425 "Transport Layer Security (TLS) Transport Mapping for Syslog" -- the counterpart of RFC 5424 -- namely section 4.3 "Sending data", the proper framing for syslog over TCP with TLS is:

APPLICATION-DATA = 1*SYSLOG-FRAME
SYSLOG-FRAME = MSG-LEN SP SYSLOG-MSG
MSG-LEN = NONZERO-DIGIT *DIGIT
SP = %d32
NONZERO-DIGIT = %d49-57
DIGIT = %d48 / NONZERO-DIGIT

(I.e. the message is prefixed with the bytes count of the entire frame.)

However looking in the remote_syslog2 implementation it seems it just appends an \n (and cleans the original message):

case *net.TCPConn, *tls.Conn:
l.conn.netConn.SetWriteDeadline(deadline)
_, err = io.WriteString(l.conn.netConn, p.Generate(l.tcpMaxLineLength)+"\n")

Thus my question is if remote_syslog2 is actually compliant with RFC 5425?

(The documentation doesn't seem to state that it is compliant, however it keeps mentioning TLS and thus seems to hint so.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions