Skip to contentSkip to conversation

opensm/osm_sa_path_record.c: Make sure either none or both ServiceID parameters are supplied

PATCH New Hal Rosenstock 1 participant 1 message Feb 20, 2013 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 opensm/osm_sa_path_record.c: Make sure either none or both ServiceID parameters are supplied

---

opensm/osm_sa_path_record.c +8 -0
index 17569cb..8978883 100644
@@ -1764,6 +1761,14 @@ void osm_pr_rcv_process(IN void *context, IN void *data)
 		}
 	}
 
+	/* Make sure either none or both ServiceID parameters are supplied */
+	if ((p_sa_mad->comp_mask & IB_PR_COMPMASK_SERVICEID) != 0 &&
+	    (p_sa_mad->comp_mask & IB_PR_COMPMASK_SERVICEID) !=
+	     IB_PR_COMPMASK_SERVICEID) {
+		osm_sa_send_error(sa, p_madw, IB_SA_MAD_STATUS_INSUF_COMPS);
+		goto Exit;
+	}
+
 	cl_qlist_init(&pr_list);
 
 	/*

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html