diff options
author | Leon Romanovsky <leonro@mellanox.com> | 2017-06-12 16:00:19 +0300 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2017-08-10 13:18:45 +0300 |
commit | e3a2b93dddad315f01a4b67faee738954c084072 (patch) | |
tree | 6194df37cb3f0e4eda9fbff7e0c7bd4c39733125 /drivers/infiniband/core/addr.c | |
parent | 5d7ee40907507e8439044f415f3e1de216a26dea (diff) | |
download | linux-e3a2b93dddad315f01a4b67faee738954c084072.tar.xz |
RDMA/netlink: Add flag to consolidate common handling
Add ability to provide flags to control RDMA netlink callbacks
and convert addr.c and sa_query.c to be first users of such
infrastructure. It allows to move their CAP_NET_ADMIN checks
into netlink core.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Steve Wise <swise@opengridcomputing.com>
Diffstat (limited to 'drivers/infiniband/core/addr.c')
-rw-r--r-- | drivers/infiniband/core/addr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c index 01236cef7bfb..9f3339861ec5 100644 --- a/drivers/infiniband/core/addr.c +++ b/drivers/infiniband/core/addr.c @@ -134,8 +134,7 @@ int ib_nl_handle_ip_res_resp(struct sk_buff *skb, const struct nlmsghdr *nlh = (struct nlmsghdr *)cb->nlh; if ((nlh->nlmsg_flags & NLM_F_REQUEST) || - !(NETLINK_CB(skb).sk) || - !netlink_capable(skb, CAP_NET_ADMIN)) + !(NETLINK_CB(skb).sk)) return -EPERM; if (ib_nl_is_good_ip_resp(nlh)) |