[openib-general] [PATCH] OpenSM/ib_types.h: In ib_gid_is_link_local, only compare /10 to default subnet prefix to determine is link local

Hal Rosenstock halr at voltaire.com
Tue Jan 2 16:03:42 PST 2007


OpenSM/ib_types.h: In ib_gid_is_link_local, only compare /10 to default
subnet prefix to determine is link local

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

diff --git a/osm/include/iba/ib_types.h b/osm/include/iba/ib_types.h
index 573b294..0f710e1 100644
--- a/osm/include/iba/ib_types.h
+++ b/osm/include/iba/ib_types.h
@@ -2168,7 +2168,8 @@ static inline boolean_t	OSM_API
 ib_gid_is_link_local(
 	IN	const	ib_gid_t* const		p_gid )
 {
-	return( ib_gid_get_subnet_prefix( p_gid ) == IB_DEFAULT_SUBNET_PREFIX );
+	return( ( ib_gid_get_subnet_prefix( p_gid ) &
+		CL_HTON64( 0xFFE0000000000000ULL ) ) == IB_DEFAULT_SUBNET_PREFIX );
 }
 /*
 * PARAMETERS







More information about the general mailing list