summaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
diff options
context:
space:
mode:
authorMatan Barak <matanb@mellanox.com>2015-12-23 14:56:53 +0200
committerDoug Ledford <dledford@redhat.com>2015-12-23 10:35:12 -0500
commit200298326b276d8dbeff204f7d407432100d9963 (patch)
tree285f2b2fbcc1c6672ce95f7d24009b328078fba4 /drivers/infiniband/hw/ocrdma/ocrdma_ah.c
parent6020d7e5004cc8591d61d449e9285a6f08279541 (diff)
downloadlinux-200298326b276d8dbeff204f7d407432100d9963.tar.bz2
IB/core: Validate route when we init ah
In order to make sure API users don't try to use SGIDs which don't conform to the routing table, validate the route before searching the RoCE GID table. Signed-off-by: Matan Barak <matanb@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/ocrdma/ocrdma_ah.c')
-rw-r--r--drivers/infiniband/hw/ocrdma/ocrdma_ah.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
index 9820074be59d..a343e0377bf6 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_ah.c
@@ -154,7 +154,7 @@ struct ib_ah *ocrdma_create_ah(struct ib_pd *ibpd, struct ib_ah_attr *attr)
(!rdma_link_local_addr((struct in6_addr *)attr->grh.dgid.raw))) {
status = rdma_addr_find_dmac_by_grh(&sgid, &attr->grh.dgid,
attr->dmac, &vlan_tag,
- sgid_attr.ndev->ifindex);
+ &sgid_attr.ndev->ifindex);
if (status) {
pr_err("%s(): Failed to resolve dmac from gid."
"status = %d\n", __func__, status);