aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChander Govindarajan <mail@chandergovind.org>2023-07-17 15:02:46 +0530
committerStephen Hemminger <stephen@networkplumber.org>2023-07-17 08:07:05 -0700
commit0b954463083b5c04f8e577b3764dbec35fcb8a7d (patch)
tree1b6d3d49cbabb060bc213083242d85c65df371f5
parent61695c493ec14a63740bbb81e0564f753bd054dd (diff)
downloadiproute2-0b954463083b5c04f8e577b3764dbec35fcb8a7d.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 f6f9ba502..6c76fa156 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, n->val);
+ print_one_json(jw, n, vals);
else
print_one_if(fp, n, vals);
}