]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
rdma: Fix for ineffective check in add_filter()
authorPhil Sutter <phil@nwl.cc>
Thu, 18 Oct 2018 11:41:54 +0000 (13:41 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 22 Oct 2018 17:05:18 +0000 (10:05 -0700)
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

index d4b7ba1918b13174a3537a198b7a50a63b59caea..c3b7530b6cc7125a4764c65ff2968106210f595d 100644 (file)
@@ -34,7 +34,7 @@
 
 #define MAX_NUMBER_OF_FILTERS 64
 struct filters {
-       char name[32];
+       const char *name;
        bool is_number;
 };