Skip to content

Conversation

@derobert
Copy link
Contributor

@derobert derobert commented Aug 5, 2025

Add a LogFormat to pick framing the message with an RFC 5425 length field. The RFC doesn't specify a maximum length, but does suggest 8192; added a digit over that to make sure systemd-netlogd is not the limit. This is an alternative to the newline framing, and can also be used over plain TCP (non-TLS), e.g., RFC 6587.

This isn't full RFC 5425 support as this patch doesn't add support for client certificates.

PS: I extended the SysLogTransmissionLogFormat table the way you currently have it, which uses powers-of-two like a bit mask (as if you could set multiple of them). I didn't actually see it used like that in the code though, so I'm not sure why it and SysLogTransmissionProtocol are done that way. I think that's wasting some space in in the log_format_table and protocol_table (currently an insignificant amount, but doubling each new flag) but otherwise doesn't matter.

Add a format to pick framing the message with an RFC 5425 length field.
The RFC doesn't specify a maximum length, but does suggest 8192; added a
digit over that to make sure systemd-netlogd is not the limit.
@ssahani ssahani merged commit 0c79bc9 into systemd:main Aug 19, 2025
1 check passed
@derobert derobert deleted the feature/add-rfc5425-framing branch August 20, 2025 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants