Skip to contentSkip to conversation

osm_sa_mcmember_record.c: Fix incorrect comparison of IPv6 MGID when searching for SNM MLID

PATCH New Hal Rosenstock 1 participant 1 message Oct 1, 2013 InfiniBand

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 osm_sa_mcmember_record.c: Fix incorrect comparison of IPv6 MGID when searching for SNM MLID

From: Alex Netes <alexne-VPRAkNaXOzVWk0Htik3J/[email protected]>

The whole MGID except of the last 3 bytes should be compared.

---
 opensm/osm_sa_mcmember_record.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
opensm/osm_sa_mcmember_record.c +1 -1
index 82e3542..5f8e179 100644
@@ -164,7 +164,7 @@ static unsigned match_ipv4_mux_mgid(ib_gid_t * mgid)
 
 static int compare_ipv6_snm_mgids(const void *m1, const void *m2)
 {
-	return memcmp(m1, m2, sizeof(ib_gid_t) - 6);
+	return memcmp(m1, m2, sizeof(ib_gid_t) - 3);
 }
 
 static ib_net16_t find_ipv6_snm_mlid(osm_subn_t *subn, ib_gid_t *mgid)
Signature · 6 lines
1.7.8.2

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