Skip to content

Add RFC5425 length field #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

derobert
Copy link

@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.
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.

1 participant