38 lines
1.3 KiB
Diff
38 lines
1.3 KiB
Diff
|
From 1264732c29782e314d02ac3fb494909d8815fa02 Mon Sep 17 00:00:00 2001
|
||
|
From: Leon Romanovsky <leonro@mellanox.com>
|
||
|
Date: Tue, 3 Apr 2018 10:28:42 +0300
|
||
|
Subject: [PATCH] rdma: Ignore unknown netlink attributes
|
||
|
|
||
|
The check if netlink attributes supplied more than maximum supported
|
||
|
is to strict and may lead to backward compatibility issues with old
|
||
|
application with a newer kernel that supports new attribute.
|
||
|
|
||
|
CC: Steve Wise <swise@opengridcomputing.com>
|
||
|
Fixes: 74bd75c2b68d ("rdma: Add basic infrastructure for RDMA tool")
|
||
|
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
|
||
|
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
|
||
|
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
||
|
(cherry picked from commit fda0a61dde744abe69d4227f62b66238460c9011)
|
||
|
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
||
|
---
|
||
|
rdma/utils.c | 3 ++-
|
||
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
||
|
|
||
|
diff --git a/rdma/utils.c b/rdma/utils.c
|
||
|
index f9460162ce369..910b3800eade5 100644
|
||
|
--- a/rdma/utils.c
|
||
|
+++ b/rdma/utils.c
|
||
|
@@ -383,7 +383,8 @@ int rd_attr_cb(const struct nlattr *attr, void *data)
|
||
|
int type;
|
||
|
|
||
|
if (mnl_attr_type_valid(attr, RDMA_NLDEV_ATTR_MAX) < 0)
|
||
|
- return MNL_CB_ERROR;
|
||
|
+ /* We received uknown attribute */
|
||
|
+ return MNL_CB_OK;
|
||
|
|
||
|
type = mnl_attr_get_type(attr);
|
||
|
|
||
|
--
|
||
|
2.17.0
|
||
|
|