aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_rc.c
diff options
context:
space:
mode:
authorBryan O'Sullivan <bos@pathscale.com>2006-09-28 12:00:06 -0400
committerRoland Dreier <rolandd@cisco.com>2006-09-28 14:16:39 -0400
commit10aeb0e6d8823c1cccf9edc8401c848745c128be (patch)
tree641cd8b5ff5e82598703a9502622894b78ef75f3 /drivers/infiniband/hw/ipath/ipath_rc.c
parent7dae5bff2e8e4699744e782a6e7605ad18d1240e (diff)
IB/ipath: RC and UC should validate SLID and DLID
This is required for IB conformance (spec ch. 9.6.1.5). Signed-off-by: Bryan O'Sullivan <bryan.osullivan@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_rc.c')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_rc.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_rc.c b/drivers/infiniband/hw/ipath/ipath_rc.c
index 52caa2edf5a4..898f996513f8 100644
--- a/drivers/infiniband/hw/ipath/ipath_rc.c
+++ b/drivers/infiniband/hw/ipath/ipath_rc.c
@@ -1320,6 +1320,10 @@ void ipath_rc_rcv(struct ipath_ibdev *dev, struct ipath_ib_header *hdr,
1320 struct ib_reth *reth; 1320 struct ib_reth *reth;
1321 int header_in_data; 1321 int header_in_data;
1322 1322
1323 /* Validate the SLID. See Ch. 9.6.1.5 */
1324 if (unlikely(be16_to_cpu(hdr->lrh[3]) != qp->remote_ah_attr.dlid))
1325 goto done;
1326
1323 /* Check for GRH */ 1327 /* Check for GRH */
1324 if (!has_grh) { 1328 if (!has_grh) {
1325 ohdr = &hdr->u.oth; 1329 ohdr = &hdr->u.oth;