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