@@ -304,6 +304,13 @@ static int ucm_reject(ib_hca_transport_t *tp, ib_cm_msg_t *msg)
smsg.sqpn = msg->dqpn;
dapl_os_memcpy(&smsg.daddr, &msg->saddr, sizeof(union dcm_addr));
+
+ /* no dst_addr IB info in REQ, init lid, gid, get type from saddr */
+ smsg.saddr.ib.lid = tp->addr.ib.lid;
+ smsg.saddr.ib.qp_type = msg->saddr.ib.qp_type;
+ dapl_os_memcpy(&smsg.saddr.ib.gid[0],
+ &tp->addr.ib.gid, 16);
+
dapl_os_memcpy(&smsg.saddr, &msg->daddr, sizeof(union dcm_addr));
dapl_dbg_log(DAPL_DBG_TYPE_CM,
@@ -1736,10 +1743,11 @@ dapls_ib_reject_connection(IN dp_ib_cm_handle_t cm,
if (psize > DCM_MAX_PDATA_SIZE)
return DAT_LENGTH_ERROR;
- /* cr_thread will destroy CR, update saddr lid, gid info */
+ /* cr_thread will destroy CR, update saddr lid, gid, qp_type info */
dapl_os_lock(&cm->lock);
cm->state = DCM_REJECTED;
cm->msg.saddr.ib.lid = cm->hca->ib_trans.addr.ib.lid;
+ cm->msg.saddr.ib.qp_type = cm->msg.daddr.ib.qp_type;
dapl_os_memcpy(&cm->msg.saddr.ib.gid[0],
&cm->hca->ib_trans.addr.ib.gid, 16);
cm->msg.op = htons(DCM_REJ_USER);