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
F81987668: D27206.diff
Wed, Apr 24, 4:51 AM
F81944962: D27206.diff
Tue, Apr 23, 1:55 PM
Unknown Object (File)
Sun, Apr 21, 7:15 PM
Unknown Object (File)
Mar 2 2024, 12:10 AM
Unknown Object (File)
Mar 2 2024, 12:10 AM
Unknown Object (File)
Feb 7 2024, 3:50 PM
Unknown Object (File)
Feb 6 2024, 4:10 PM
Unknown Object (File)
Jan 9 2024, 5:06 AM

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
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.