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: 74bd75c2b6 ("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>
This commit is contained in:
Leon Romanovsky 2018-04-03 10:28:42 +03:00 committed by Stephen Hemminger
parent 2c62a64d60
commit fda0a61dde
1 changed files with 2 additions and 1 deletions

View File

@ -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);