]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
rdma: Ignore unknown netlink attributes
authorLeon Romanovsky <leonro@mellanox.com>
Tue, 3 Apr 2018 07:28:42 +0000 (10:28 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 4 Apr 2018 23:39:58 +0000 (16:39 -0700)
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>
rdma/utils.c

index a2e08e914f302a6a42fd41f1daf159e8d8c883ae..5c1e736afa408b0ea02676bc99891a1adb4f6cd1 100644 (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);