[openib-general] [PATCH][MINOR] OpenSM/osm_sa_informinfo.c: Conformance changes for subscribe component

Hal Rosenstock halr at voltaire.com
Wed Dec 6 14:15:44 PST 2006


OpenSM/osm_sa_informinfo.c: Conformance changes for subscribe component

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

diff --git a/osm/opensm/osm_sa_informinfo.c b/osm/opensm/osm_sa_informinfo.c
index ad705b5..5d81b84 100644
--- a/osm/opensm/osm_sa_informinfo.c
+++ b/osm/opensm/osm_sa_informinfo.c
@@ -339,9 +339,6 @@ __osm_infr_rcv_respond(
 
   p_resp_infr = (ib_inform_info_t*)ib_sa_mad_get_payload_ptr( p_resp_sa_mad );
 
-  /* confirm success */
-  p_resp_infr->subscribe = 1;
-
   status = osm_vendor_send( p_resp_madw->h_bind, p_resp_madw,  FALSE );
 
   if ( status != IB_SUCCESS )
@@ -754,6 +751,20 @@ osm_infr_rcv_process_set_method(
     goto Exit;
   }
 
+  /* Subscribe values above 1 are undefined */
+  if (p_recvd_inform_info->subscribe > 1)
+  {
+    cl_plock_release( p_rcv->p_lock );
+
+    osm_log( p_rcv->p_log, OSM_LOG_ERROR,
+             "osm_infr_rcv_process_set_method: ERR 4308 "
+             "Invalid subscribe: %d\n",
+             p_recvd_inform_info->subscribe
+             );
+    osm_sa_send_error( p_rcv->p_resp, p_madw, IB_SA_MAD_STATUS_REQ_INVALID );
+    goto Exit;
+  }
+
   /*
    * MODIFICATIONS DONE ON INCOMING REQUEST:
    *







More information about the general mailing list