lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191225190418.8806-11-lesliemonis@gmail.com>
Date:   Thu, 26 Dec 2019 00:34:18 +0530
From:   Leslie Monis <lesliemonis@...il.com>
To:     Linux NetDev <netdev@...r.kernel.org>
Cc:     David Ahern <dsahern@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Toke Høiland-Jørgensen <toke@...e.dk>
Subject: [PATCH iproute2-next 10/10] tc: fq_codel: fix missing statistic in JSON output

Print JSON object even if tc_fq_codel_xstats->class_stats.drop_next
is negative.

Cc: Toke Høiland-Jørgensen <toke@...e.dk>
Fixes: 997f2dc19378 ("tc: Add JSON output of fq_codel stats")
Signed-off-by: Leslie Monis <lesliemonis@...il.com>
---
 tc/q_fq_codel.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tc/q_fq_codel.c b/tc/q_fq_codel.c
index 12ce3fbf..efed4d28 100644
--- a/tc/q_fq_codel.c
+++ b/tc/q_fq_codel.c
@@ -276,12 +276,12 @@ static int fq_codel_print_xstats(struct qdisc_util *qu, FILE *f,
 			sprint_time(st->class_stats.ldelay, b1));
 		if (st->class_stats.dropping) {
 			print_bool(PRINT_ANY, "dropping", " dropping", true);
+			print_int(PRINT_JSON, "drop_next", NULL,
+				  st->class_stats.drop_next);
 			if (st->class_stats.drop_next < 0)
 				print_string(PRINT_FP, NULL, " drop_next -%s",
 					sprint_time(-st->class_stats.drop_next, b1));
 			else {
-				print_uint(PRINT_JSON, "drop_next", NULL,
-					st->class_stats.drop_next);
 				print_string(PRINT_FP, NULL, " drop_next %s",
 					sprint_time(st->class_stats.drop_next, b1));
 			}
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ