From: Marc Fournier Date: Mon, 6 Nov 2017 21:25:33 +0000 (+0100) Subject: Merge branch 'collectd-5.7' into collectd-5.8 X-Git-Tag: collectd-5.8.0~15^2 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=936d749328d399463f2bbb5ec3d07cd3a271a7c7;p=collectd.git Merge branch 'collectd-5.7' into collectd-5.8 Conflicts: src/netlink.c --- 936d749328d399463f2bbb5ec3d07cd3a271a7c7 diff --cc src/netlink.c index 0bac3e75,66129ad8..b5ae3bd2 --- a/src/netlink.c +++ b/src/netlink.c @@@ -399,23 -398,15 +403,25 @@@ static int qos_attr_cb(const struct nla return MNL_CB_OK; if (mnl_attr_get_type(attr) == TCA_STATS_BASIC) { - if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(**bs)) < 0) { + if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*q_stats->bs)) < 0) { + char errbuf[1024]; ERROR("netlink plugin: qos_attr_cb: TCA_STATS_BASIC mnl_attr_validate2 " - "failed."); + "failed: %s", + sstrerror(errno, errbuf, sizeof(errbuf))); return MNL_CB_ERROR; } - *bs = mnl_attr_get_payload(attr); - return MNL_CB_STOP; + q_stats->bs = mnl_attr_get_payload(attr); + return MNL_CB_OK; + } + + if (mnl_attr_get_type(attr) == TCA_STATS_QUEUE) { + if (mnl_attr_validate2(attr, MNL_TYPE_UNSPEC, sizeof(*q_stats->qs)) < 0) { + ERROR("netlink plugin: qos_attr_cb: TCA_STATS_QUEUE mnl_attr_validate2 " + "failed."); + return MNL_CB_ERROR; + } + q_stats->qs = mnl_attr_get_payload(attr); + return MNL_CB_OK; } return MNL_CB_OK;