From 3b44cc54056c45e8a4214b60319dfbfada91b423 Mon Sep 17 00:00:00 2001 From: Marc Fournier Date: Thu, 18 Jul 2013 12:07:35 +0200 Subject: [PATCH] libmnl: fix 2 mistakes preventing building with --enable-debug --- src/netlink.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/netlink.c b/src/netlink.c index 59c21cce..0c06e78a 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -376,14 +376,6 @@ static int qos_filter_cb (const struct nlmsghdr *nlh, void *args) int __attribute__((unused)) stats_submitted = 0; - if (tm->tcm_ifindex != wanted_ifindex) - { - DEBUG ("netlink plugin: qos_filter_cb: Got %s for interface #%i, " - "but expected #%i.", - tc_type, msg->tcm_ifindex, wanted_ifindex); - return MNL_CB_OK; - } - if (nlh->nlmsg_type == RTM_NEWQDISC) tc_type = "qdisc"; else if (nlh->nlmsg_type == RTM_NEWTCLASS) @@ -397,6 +389,14 @@ static int qos_filter_cb (const struct nlmsghdr *nlh, void *args) return MNL_CB_ERROR; } + if (tm->tcm_ifindex != wanted_ifindex) + { + DEBUG ("netlink plugin: qos_filter_cb: Got %s for interface #%i, " + "but expected #%i.", + tc_type, tm->tcm_ifindex, wanted_ifindex); + return MNL_CB_OK; + } + if ((tm->tcm_ifindex >= 0) && ((size_t) tm->tcm_ifindex >= iflist_len)) { @@ -449,7 +449,7 @@ static int qos_filter_cb (const struct nlmsghdr *nlh, void *args) } DEBUG ("netlink plugin: qos_filter_cb: got %s for %s (%i).", - tc_type, dev, msg->tcm_ifindex); + tc_type, dev, tm->tcm_ifindex); if (check_ignorelist (dev, tc_type, tc_inst)) return MNL_CB_OK; -- 2.30.2