aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChander Govindarajan <mail@chandergovind.org>2023-07-24 18:23:48 -0700
committerStephen Hemminger <stephen@networkplumber.org>2023-07-24 18:23:48 -0700
commit58c2530c7efecc568127f0ca3764576c22c38cc9 (patch)
treed5ca6d809af160e9618d2ab28f8db5168b120851
parent912f5de4aa8d42405e48ed20c360e42199f84b8d (diff)
downloadiproute2-58c2530c7efecc568127f0ca3764576c22c38cc9.tar.gz
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 <mail@chandergovind.org> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
-rw-r--r--misc/ifstat.c2
1 files changed, 1 insertions, 1 deletions
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);
}