From: Phil Sutter Date: Thu, 21 Feb 2019 18:37:51 +0000 (+0100) Subject: ip-address: Use correct max attribute value in print_vf_stats64() X-Git-Tag: v5.0.0~13 X-Git-Url: https://git.proxmox.com/?p=mirror_iproute2.git;a=commitdiff_plain;h=d7cf2416fc3a08b411beffb93a9e118f6593892d 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: a1b99717c7cd7 ("Add displaying VF traffic statistics") Signed-off-by: Phil Sutter Signed-off-by: Stephen Hemminger --- diff --git a/ip/ipaddress.c b/ip/ipaddress.c index 2bc33f3a..76edf706 100644 --- a/ip/ipaddress.c +++ b/ip/ipaddress.c @@ -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");