summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3b44cc5)
raw | patch | inline | side by side (parent: 3b44cc5)
author | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 19 Jul 2013 14:23:56 +0000 (16:23 +0200) | ||
committer | Marc Fournier <marc.fournier@camptocamp.com> | |
Fri, 19 Jul 2013 14:33:48 +0000 (16:33 +0200) |
A type mismatch and offset mistake was preventing the interface list
from getting iterated. This was making collectd segfault when the
"QDisc", "Class" or "Filter" options were enabled.
from getting iterated. This was making collectd segfault when the
"QDisc", "Class" or "Filter" options were enabled.
src/netlink.c | patch | blob | history |
diff --git a/src/netlink.c b/src/netlink.c
index 0c06e78afdb26b07114f3e1edf056b036a7e740f..ca8f7c52cd0ba9dcde3e335672cec80a785dcca5 100644 (file)
--- a/src/netlink.c
+++ b/src/netlink.c
/* `link_filter_cb' will update `iflist' which is used here to iterate
* over all interfaces. */
- for (ifindex = 0; ifindex < iflist_len; ifindex++)
+ for (ifindex = 1; ifindex < iflist_len; ifindex++)
{
struct tcmsg *tm;
- int ifindex;
size_t type_index;
if (iflist[ifindex] == NULL)
continue;
}
- DEBUG ("netlink plugin: ir_read: querying %s from %s (%i).",
+ DEBUG ("netlink plugin: ir_read: querying %s from %s (%lu).",
type_name[type_index], iflist[ifindex], ifindex);
nlh = mnl_nlmsg_put_header (buf);