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.
/* `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);