diff mbox

[opensm] osm_mcast_mgr.c: Fix wrong comparison in mcast_mgr_subdivide()

Message ID 528D451F.3040404@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Hal Rosenstock Nov. 20, 2013, 11:26 p.m. UTC
From: Alex Netes <alexne@mellanox.com>

port_num must be less than array_size (num of ports on a node).

Signed-off-by: Alex Netes <alexne@mellanox.com>
---
 opensm/osm_mcast_mgr.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/opensm/osm_mcast_mgr.c b/opensm/osm_mcast_mgr.c
index 837428b..029ba40 100644
--- a/opensm/osm_mcast_mgr.c
+++ b/opensm/osm_mcast_mgr.c
@@ -605,7 +605,7 @@  static void mcast_mgr_subdivide(osm_sm_t * sm, uint16_t mlid_ho,
 			continue;
 		}
 
-		if (port_num > array_size) {
+		if (port_num >= array_size) {
 			OSM_LOG(sm->p_log, OSM_LOG_ERROR, "ERR 0A04: "
 				"Error routing MLID 0x%X through switch 0x%"
 				PRIx64 " %s\n"
@@ -616,8 +616,6 @@  static void mcast_mgr_subdivide(osm_sm_t * sm, uint16_t mlid_ho,
 				cl_ntoh16(osm_port_get_base_lid
 					  (p_wobj->p_port)));
 			mcast_work_obj_delete(p_wobj);
-			/* This is means OpenSM has a bug. */
-			CL_ASSERT(FALSE);
 			continue;
 		}