From: Chander Govindarajan Date: Tue, 25 Jul 2023 01:23:48 +0000 (-0700) Subject: misc/ifstat: fix incorrect output data in json mode X-Git-Tag: v6.5.0~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58c2530c7efecc568127f0ca3764576c22c38cc9;p=thirdparty%2Fiproute2.git misc/ifstat: fix incorrect output data in json mode Due to this bug, in json mode (with the -j flag), the output was always in absolute mode (as if passing in the -a flag) and not in relative mode. Signed-off-by: Chander Govindarajan Signed-off-by: Stephen Hemminger --- diff --git a/misc/ifstat.c b/misc/ifstat.c index 6c76fa156..f6f9ba502 100644 --- a/misc/ifstat.c +++ b/misc/ifstat.c @@ -569,7 +569,7 @@ static void dump_incr_db(FILE *fp) continue; if (jw) - print_one_json(jw, n, vals); + print_one_json(jw, n, n->val); else print_one_if(fp, n, vals); }