naccyde / rpms / iproute

Forked from rpms/iproute 7 months ago
Clone

Blame SOURCES/0071-ip-address-Use-correct-max-attribute-value-in-print_.patch

36cfb7
From 861fe3293afa0907f9883df005e7a09a5f4b710b Mon Sep 17 00:00:00 2001
36cfb7
From: Andrea Claudi <aclaudi@redhat.com>
36cfb7
Date: Mon, 29 Apr 2019 18:14:04 +0200
36cfb7
Subject: [PATCH] ip-address: Use correct max attribute value in
36cfb7
 print_vf_stats64()
36cfb7
36cfb7
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1679749
36cfb7
Upstream Status: iproute2.git commit d7cf2416fc3a0
36cfb7
36cfb7
commit d7cf2416fc3a08b411beffb93a9e118f6593892d
36cfb7
Author: Phil Sutter <phil@nwl.cc>
36cfb7
Date:   Thu Feb 21 19:37:51 2019 +0100
36cfb7
36cfb7
    ip-address: Use correct max attribute value in print_vf_stats64()
36cfb7
36cfb7
    IFLA_VF_MAX is larger than the highest valid index in vf array.
36cfb7
36cfb7
    Fixes: a1b99717c7cd7 ("Add displaying VF traffic statistics")
36cfb7
    Signed-off-by: Phil Sutter <phil@nwl.cc>
36cfb7
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
36cfb7
---
36cfb7
 ip/ipaddress.c | 2 +-
36cfb7
 1 file changed, 1 insertion(+), 1 deletion(-)
36cfb7
36cfb7
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
36cfb7
index 44111a27501a9..bed2d3801809b 100644
36cfb7
--- a/ip/ipaddress.c
36cfb7
+++ b/ip/ipaddress.c
36cfb7
@@ -467,7 +467,7 @@ static void print_vf_stats64(FILE *fp, struct rtattr *vfstats)
36cfb7
 		return;
36cfb7
 	}
36cfb7
 
36cfb7
-	parse_rtattr_nested(vf, IFLA_VF_MAX, vfstats);
36cfb7
+	parse_rtattr_nested(vf, IFLA_VF_STATS_MAX, vfstats);
36cfb7
 
36cfb7
 	/* RX stats */
36cfb7
 	fprintf(fp, "%s", _SL_);
36cfb7
-- 
e138d9
2.21.0
36cfb7