]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
ip-address: Use correct max attribute value in print_vf_stats64()
authorPhil Sutter <phil@nwl.cc>
Thu, 21 Feb 2019 18:37:51 +0000 (19:37 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Thu, 21 Feb 2019 22:16:08 +0000 (14:16 -0800)
IFLA_VF_MAX is larger than the highest valid index in vf array.

Fixes: a1b99717c7cd7 ("Add displaying VF traffic statistics")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
ip/ipaddress.c

index 2bc33f3a3b3f2b1097a4e84b8dde4d99ec3bd206..76edf7064819c08970db32e5ddf665112996be9a 100644 (file)
@@ -547,7 +547,7 @@ static void print_vf_stats64(FILE *fp, struct rtattr *vfstats)
                return;
        }
 
-       parse_rtattr_nested(vf, IFLA_VF_MAX, vfstats);
+       parse_rtattr_nested(vf, IFLA_VF_STATS_MAX, vfstats);
 
        if (is_json_context()) {
                open_json_object("stats");