[openib-general] [PATCH] OpenSM - fix sm_key check in osm_sa_mcmember_record.c

Yael Kalka yael at mellanox.co.il
Sun Mar 19 04:55:25 PST 2006


Hi Hal,

We noticed that when sending MCMemberRecord query, there is a check if
the requestor is trusted (if not then PortGid, join_state and
proxy_join are returned as zero). But, currently the trusted check is
done on the sm_key in the response mad, which is set to zero
(according to C15-0.1.5), instead of checking the sm_key in the
request mad.
The following patch fixes this issue, and also removes a comment out
of place.

Thanks,
Yael

Signed-off-by:  Yael Kalka <yael at mellanox.co.il>

Index: opensm/osm_sa_mcmember_record.c
===================================================================
--- opensm/osm_sa_mcmember_record.c	(revision 5882)
+++ opensm/osm_sa_mcmember_record.c	(working copy)
@@ -1952,13 +1952,6 @@ __osm_sa_mcm_by_comp_mask_cb(
   if (! osm_physp_has_pkey( p_rcv->p_log, p_mgrp->mcmember_rec.pkey, p_req_physp ))
     goto Exit;
 
-  /*
-   * o15-0.1.16: If SA supports UD multicast, then if it receives a
-   * SubnAdmGetTable() of MCMemberRecord with the MCMemberRecord:PortGID
-   * wildcarded, then SA shall return a single MCMemberRecord for each
-   * multicast group that matches the query operation.
-   */
-
   /* so did we got the PortGUID mask */
   if (IB_MCR_COMPMASK_PORT_GID & comp_mask)
   {
@@ -2219,7 +2212,7 @@ osm_mcmr_query_mgrp(IN osm_mcmr_recv_t* 
     the mad is valid. Meaning - is either zero or equal to the local
     sm_key.
   */
-  if (p_resp_sa_mad->sm_key == 0)
+  if (p_rcvd_mad->sm_key == 0)
     trusted_req = FALSE;
 
   for ( i = 0; i < pre_trim_num_rec; i++ )




More information about the general mailing list