From: Alex Netes <ale...@mellanox.com>

Out of range lids isn't a fatal event and SM code just ignores these
lids.

Signed-off-by: Alex Netes <ale...@mellanox.com>
---
 opensm/osm_db_pack.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/opensm/osm_db_pack.c b/opensm/osm_db_pack.c
index 708a875..8cddd06 100644
--- a/opensm/osm_db_pack.c
+++ b/opensm/osm_db_pack.c
@@ -73,14 +73,18 @@ static inline int unpack_lids(IN char *p_lid_str, OUT 
uint16_t * p_min_lid,
        if (!p_num)
                return 1;
        tmp = strtoul(p_num, NULL, 0);
-       CL_ASSERT(tmp < 0x10000);
+       if (tmp >= 0xC000)
+               return 1;
+
        *p_min_lid = (uint16_t) tmp;
 
        p_num = strtok_r(NULL, " \t", &p_next);
        if (!p_num)
                return 1;
        tmp = strtoul(p_num, NULL, 0);
-       CL_ASSERT(tmp < 0x10000);
+       if (tmp >= 0xC000)
+               return 1;
+
        *p_max_lid = (uint16_t) tmp;
 
        return 0;
-- 
1.7.8.2

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

Reply via email to