naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0030-rdma-Fix-for-ineffective-check-in-add_filter.patch

7e752c
From ad7f7e4a1fd4e0362a6d256c0d093d43b44e2c1d Mon Sep 17 00:00:00 2001
7e752c
From: Phil Sutter <psutter@redhat.com>
7e752c
Date: Thu, 25 Oct 2018 12:24:30 +0200
7e752c
Subject: [PATCH] rdma: Fix for ineffective check in add_filter()
7e752c
7e752c
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1602555
7e752c
Upstream Status: iproute2.git commit 3b0070f6b1a31
7e752c
7e752c
commit 3b0070f6b1a319b7d6a431a39270a4804cb5927e
7e752c
Author: Phil Sutter <phil@nwl.cc>
7e752c
Date:   Thu Oct 18 13:41:54 2018 +0200
7e752c
7e752c
    rdma: Fix for ineffective check in add_filter()
7e752c
7e752c
    With 'name' field defined as array in struct filters, it will always
7e752c
    contain a value irrespective of whether a name was assigned or not.
7e752c
7e752c
    Fix this by turning the field into a const char pointer.
7e752c
7e752c
    Fixes: 1174be72d1b4c ("rdma: Add filtering infrastructure")
7e752c
    Signed-off-by: Phil Sutter <phil@nwl.cc>
7e752c
    Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
7e752c
---
7e752c
 rdma/rdma.h | 2 +-
7e752c
 1 file changed, 1 insertion(+), 1 deletion(-)
7e752c
7e752c
diff --git a/rdma/rdma.h b/rdma/rdma.h
7e752c
index d4b7ba1..c3b7530 100644
7e752c
--- a/rdma/rdma.h
7e752c
+++ b/rdma/rdma.h
7e752c
@@ -34,7 +34,7 @@
7e752c
 
7e752c
 #define MAX_NUMBER_OF_FILTERS 64
7e752c
 struct filters {
7e752c
-	char name[32];
7e752c
+	const char *name;
7e752c
 	bool is_number;
7e752c
 };
7e752c
 
7e752c
-- 
7e752c
1.8.3.1
7e752c