ip-address: Use correct max attribute value in print_vf_stats64()

IFLA_VF_MAX is larger than the highest valid index in vf array.

Fixes: a1b99717c7 ("Add displaying VF traffic statistics")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
This commit is contained in:
Phil Sutter 2019-02-21 19:37:51 +01:00 committed by Stephen Hemminger
parent f5f8e96953
commit d7cf2416fc
1 changed files with 1 additions and 1 deletions

View 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");