From 4ba48e6280455f0e3ab13584b5909d5aece1ad6a Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 30 Aug 2007 23:35:39 +0200 Subject: [PATCH] netlink plugin: Fix the submitted values. --- src/netlink.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/netlink.c b/src/netlink.c index 043f023c..3c8a1fcd 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -223,8 +223,8 @@ static int link_filter (const struct sockaddr_nl *sa, struct nlmsghdr *nmh, if (check_ignorelist (dev, "interface", NULL) == 0) { submit_two (dev, "if_octets", NULL, stats->rx_bytes, stats->tx_bytes); - submit_two (dev, "if_packets", NULL, stats->rx_bytes, stats->tx_bytes); - submit_two (dev, "if_errors", NULL, stats->rx_bytes, stats->tx_bytes); + submit_two (dev, "if_packets", NULL, stats->rx_packets, stats->tx_packets); + submit_two (dev, "if_errors", NULL, stats->rx_errors, stats->tx_errors); } else { @@ -271,8 +271,6 @@ static int qos_filter (const struct sockaddr_nl *sa, struct nlmsghdr *nmh, char *tc_type; char tc_inst[DATA_MAX_NAME_LEN]; - printf ("=== qos_filter ===\n"); - if (nmh->nlmsg_type == RTM_NEWQDISC) tc_type = "qdisc"; else if (nmh->nlmsg_type == RTM_NEWTCLASS) @@ -353,7 +351,7 @@ static int qos_filter (const struct sockaddr_nl *sa, struct nlmsghdr *nmh, memcpy (&bs, RTA_DATA (attrs_stats[TCA_STATS_BASIC]), MIN (RTA_PAYLOAD (attrs_stats[TCA_STATS_BASIC]), sizeof(bs))); - submit_one (dev, "ipt_octets", type_instance, bs.bytes); + submit_one (dev, "ipt_bytes", type_instance, bs.bytes); submit_one (dev, "ipt_packets", type_instance, bs.packets); } } -- 2.11.0