From: Florian Forster Date: Wed, 30 May 2007 06:06:48 +0000 (+0200) Subject: Merge branch 'collectd-3.11' X-Git-Tag: collectd-4.0.0~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=721f8d81910c71154aba9ff8d243db52bfb584ed;p=collectd.git Merge branch 'collectd-3.11' Conflicts: ChangeLog configure.in --- 721f8d81910c71154aba9ff8d243db52bfb584ed diff --cc ChangeLog index 05772cf6,d6c87c60..afcb453d --- a/ChangeLog +++ b/ChangeLog @@@ -1,48 -1,9 +1,54 @@@ +2007-04-02, Version 4.0.0 + * collectd: The plugin-infrastructure has been changed to allow for + more types of plugins, namely `write' and `log' plugins. + * collectd: The read-function has been changed to read many plugins in + parallel, using threads. Thus, plugins generally need to use + thread-safe functions from now on. + * collectd: The '-t' command line options allows to perform syntax tests + of the configuration file and exit immediately. + * csv plugin: The new `csv' plugin handles output to `comma separated + values'-files. + * rrdtool plugin: The new `rrdtool' plugin handles output to + RRD-files. Data can be cached to combine multiple updates into one + write to increase IO-performance. + * network plugin: The new `network' plugin handles IO via the network. + It implements a different, much more extensible protocol which can + combine many values in one packet, decreasing the number of UDP- + packets being sent. It can read from and send to the network and + with the appropriate configuration even forward packets to other + networks. + * unixsock plugin: The new `unixsock' plugin provides an interface to + communicate with the daemon while it is running. Right now the + commands `GETVAL' and `PUTVAL' are implemented, but more are to + come. + * perl plugin: The new `perl' plugin allows you to write extensions + for collectd in the scripting-language Perl. + * logfile plugin: The new `logfile' plugin writes logmessages to files + or STDOUT or STDERR. + * syslog plugin: The new `syslog' plugin sends logmessages to the + system's syslog daemon. + * entropy plugin: The new `entropy' plugin collects the amount of + entropy currently being available to the system. + * exec plugin: The new `exec' plugin forks child processes and reads + back values provided by the forked processes. + * iptables plugin: The new `iptables' plugin reads counters from + iptables rules. Thanks to Sjoerd van der Berg for contributing this + plugin. + * irq plugin: The new `irq' plugin collects the IRQ-counters. Thanks + to Peter Holik for contributing this plugin. + * nut plugin: The new `nut' plugin connects the upsd of the `network + ups tools' and reads information about the connected UPS. + * apache plugin: Support for lighttpd's `BusyServers' (aka. + connections) field was added by Florent Monbillard. + * collectd-nagios: The new `collectd-nagios' binary queries values + from collectd, parses them and exits according to Nagios-standards. + + 2007-05-29, Version 3.11.5 + * configure: Added `AC_SYS_LARGEFILE' for LFS. + * ntpd plugin: Fix a potential buffer overflow. + * processes plugin: Fix a bug when run under Linux 2.4. All processes + were accounted as `zombies'. + 2007-04-10, Version 3.11.4 * dns plugin: Change the order of includes to make the plugin compile under FreeBSD. diff --cc src/ntpd.c index 83bf1628,08c0c9fb..b5f1a46c --- a/src/ntpd.c +++ b/src/ntpd.c @@@ -584,11 -655,18 +592,18 @@@ static int ntpd_receive_response (int r continue; } + /* + * Because the items in the packet may be smaller than the + * items requested, the following holds true: + */ + assert ((*res_size == pkt_item_len) + && (pkt_item_len <= res_item_size)); + /* Calculate the padding. No idea why there might be any padding.. */ pkt_padding = 0; - if (res_item_size > pkt_item_len) + if (pkt_item_len < res_item_size) pkt_padding = res_item_size - pkt_item_len; - DBG ("res_item_size = %i; pkt_padding = %i;", + DEBUG ("res_item_size = %i; pkt_padding = %i;", res_item_size, pkt_padding); /* Extract the sequence number */ @@@ -634,10 -712,10 +649,10 @@@ if (items == NULL) { items = *res_data; - syslog (LOG_ERR, "ntpd plugin: realloc failed."); + ERROR ("ntpd plugin: realloc failed."); continue; } + items_num += pkt_item_num; *res_data = items; for (i = 0; i < pkt_item_num; i++)