Page MenuHomeFreeBSD

syslogd: Added -M option that limit maximum length of forwarded message
ClosedPublic

Authored by dmitry.wagin_ya.ru on Nov 13 2020, 3:28 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 18, 5:33 AM
Unknown Object (File)
Wed, Oct 16, 4:43 AM
Unknown Object (File)
Wed, Oct 16, 4:39 AM
Unknown Object (File)
Oct 9 2024, 11:34 AM
Unknown Object (File)
Oct 3 2024, 2:47 AM
Unknown Object (File)
Oct 1 2024, 5:14 AM
Unknown Object (File)
Sep 27 2024, 11:12 PM
Unknown Object (File)
Sep 23 2024, 6:22 PM

Details

Summary

There's an enhancement to syslogd(8).

Added -M option that limit maximum length of forwarded message.
Initially syslogd had forwarded 1024-bytes messages (RFC 3164). But after D15011 forwarded messages has been truncated to 480 octets (for IPv4).
The patch allows to truncate messages by -M option (default 1024).
MAXLINE constant has been increased up to 8192 octets, corresponded to D27205.
Replaced bootfile[] size for MAXPATHLEN used in getbootfile(3) as a returned value. Using (MAXLINE+1) as a size for bootfile[] is excessive.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

0mp added inline comments.
usr.sbin/syslogd/syslogd.8
248

Please start new sentences with new lines.

248

How about Set the limit on the length of forwarded message?

Also, I'm not sure but it might be necessary to add the before minimum and maximum.

249
usr.sbin/syslogd/syslogd.c
397

Is this desired? MAXPATHLEN is not mentioned in the description of the change.

usr.sbin/syslogd/syslogd.c
397

Replaced bootfile[] size for MAXPATHLEN used in getbootfile(3) as a returned value. Using (MAXLINE+1) as a size for bootfile[] is excessive.

man:
Moved new sentences to new lines.
Added articles.

dmitry.wagin_ya.ru added inline comments.
usr.sbin/syslogd/syslogd.8
248

I don't know about it. I'm not an English-native, sorry.

Initially syslogd had forwarded 1024-bytes messages (RFC 3164). But after D15011 forwarded messages has been truncated to 480 octets (for IPv4).

The reasoning is given in RFC 5426. I tend to agree that this is too conservative.

usr.sbin/syslogd/syslogd.c
673

I suggest "minimum maximum length of forwarded messages is 480 bytes".

721

I would write it a bit shorter, e.g., "RFC 3164 messages may not exceed 1024 bytes"

This revision is now accepted and ready to land.Mar 22 2021, 5:06 PM
This revision now requires review to proceed.Mar 22 2021, 9:14 PM
dmitry.wagin_ya.ru added inline comments.
usr.sbin/syslogd/syslogd.c
673

Maybe better "minimum length limit of forwarded messages is 480 bytes"?

usr.sbin/syslogd/syslogd.c
673

That's better, thanks.

This revision was not accepted when it landed; it landed in state Needs Review.Mar 23 2021, 4:53 PM
This revision was automatically updated to reflect the committed changes.