NagiosEnterprises / nsca

NSCA Passive Check Daemon
GNU General Public License v2.0
41 stars 25 forks source link

issue with MAX_PLUGINOUTPUT_LENGTH #10

Closed tmcnag closed 7 years ago

tmcnag commented 7 years ago

This issue has been automatically migrated from http://tracker.nagios.org/view.php?id=0000078 - Please follow that link for details and two comments. Originally submitted on 2009-08-28 by xavierb

send_nsca and nsca always work on a static packet whose size is determined at compile time. They send/receive this packet in full, even if most of it is garbage, and compute the CRC32 over the whole of this packet.

if client and server were compiled with a different MAX_PLUGINOUTPUT_LENGTH, they won't be able to cooperate because the CRC32 will always be wrong.

Would it be possible to modify the code to allow different size in the client and server, without breaking the functionality ?

The issue showed up when I patched nsca 2.7.2 with a MAX_PLUGINOUTPUT_LENGTH of 8k to match nagios value. See https://bugzilla.redhat.com/show_bug.cgi?id=497847 for details.

jfrickson commented 7 years ago

I could maybe make variable-length but backward-compatible buffers like I did for NRPE. We'll have to discuss internally.

hedenface commented 7 years ago

We aren't going to fix this, as it really isn't that cumbersome to require someone maintain the same MAX_PLUGINOUTPUT_LENGTH on the clients on which they compile from source.