netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 rdma: Ignore unknown netlink attributes
@ 2018-04-03  7:28 Leon Romanovsky
  2018-04-03 13:32 ` Steve Wise
  2018-04-04 23:43 ` Stephen Hemminger
  0 siblings, 2 replies; 4+ messages in thread
From: Leon Romanovsky @ 2018-04-03  7:28 UTC (permalink / raw)
  To: Stephen Hemminger
  Cc: Leon Romanovsky, netdev, RDMA mailing list, David Ahern,
	Steve Wise

From: Leon Romanovsky <leonro@mellanox.com>

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>
---
 rdma/utils.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rdma/utils.c b/rdma/utils.c
index a2e08e91..5c1e736a 100644
--- a/rdma/utils.c
+++ b/rdma/utils.c
@@ -399,7 +399,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);

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-04-04 23:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-03  7:28 [PATCH iproute2 rdma: Ignore unknown netlink attributes Leon Romanovsky
2018-04-03 13:32 ` Steve Wise
2018-04-04  5:42   ` Leon Romanovsky
2018-04-04 23:43 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).