]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
misc/ifstat: fix incorrect output data in json mode
authorChander Govindarajan <mail@chandergovind.org>
Mon, 17 Jul 2023 09:32:46 +0000 (15:02 +0530)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 17 Jul 2023 15:07:05 +0000 (08:07 -0700)
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>
misc/ifstat.c

index f6f9ba5027d3a3e395d49bf06e4e8566caa065c3..6c76fa156a2a65f9f1e4349b5b29772e5cce22cb 100644 (file)
@@ -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);
        }