naccyde / rpms / iproute

Forked from rpms/iproute 10 months ago
Clone

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

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