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:
parent
f5f8e96953
commit
d7cf2416fc
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue