diff mbox

[opensm] osm_sw_info_rcv.c: Add check of switch mcast_cap

Message ID 530F2DC0.8000204@dev.mellanox.co.il (mailing list archive)
State Accepted
Delegated to: Hal Rosenstock
Headers show

Commit Message

Hal Rosenstock Feb. 27, 2014, 12:21 p.m. UTC
From: Ilya Nelkenbaum <ilyan@mellanox.com>

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>
---
 opensm/osm_sw_info_rcv.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff mbox

Patch

diff --git a/opensm/osm_sw_info_rcv.c b/opensm/osm_sw_info_rcv.c
index 77c5be7..ce747a9 100644
--- a/opensm/osm_sw_info_rcv.c
+++ b/opensm/osm_sw_info_rcv.c
@@ -222,7 +222,8 @@  static void si_rcv_process_new(IN osm_sm_t * sm, IN osm_node_t * p_node,
 	}
 
 	/* set subnet max mlid to the minimum MulticastFDBCap of all switches */
-	if (cl_ntoh16(p_si->mcast_cap) + IB_LID_MCAST_START_HO - 1 <
+	if (p_si->mcast_cap &&
+	    cl_ntoh16(p_si->mcast_cap) + IB_LID_MCAST_START_HO - 1 <
 	    sm->p_subn->max_mcast_lid_ho) {
 		sm->p_subn->max_mcast_lid_ho = cl_ntoh16(p_si->mcast_cap) +
 			IB_LID_MCAST_START_HO - 1;