author | Florian Forster <octo@huhu.verplant.org> | |
Wed, 30 May 2007 06:06:48 +0000 (08:06 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Wed, 30 May 2007 06:06:48 +0000 (08:06 +0200) |
Conflicts:
ChangeLog
configure.in
ChangeLog
configure.in
1 | 2 | |||
---|---|---|---|---|
ChangeLog | patch | | diff1 | | diff2 | | blob | history |
src/ntpd.c | patch | | diff1 | | diff2 | | blob | history |
diff --cc ChangeLog
index 05772cf659f5858cf9e670b574410788a945b920,d6c87c603f18ff0ede931ac11d595f2a2d9ed3f6..afcb453d257226fd0ce64ae7ee358a669952bbef
+++ b/ChangeLog
+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 83bf1628734c51fb782b87e015fdc075a884e50a,08c0c9fb129a80c660eb339d755518a82def5b92..b5f1a46c320306cd6c0e14af34327b30bbb238cc
--- 1/src/ntpd.c
--- 2/src/ntpd.c
+++ b/src/ntpd.c
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 */
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++)