[openib-general] [PATCHv2] OpenSM/ib_types.h: In ib_gid_is_link_local, only compare /10 to default subnet prefix to determine is link local
Eitan Zahavi
eitan at mellanox.co.il
Tue Jan 2 22:23:43 PST 2007
Hi Hal,
I think I miss understood your previous mail.
This patch is correcting the bug you indicated.
EZ
Hal Rosenstock wrote:
> 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..e4ef7e3 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( 0xFFC0000000000000ULL ) ) == IB_DEFAULT_SUBNET_PREFIX );
> }
> /*
> * PARAMETERS
>
>
>
>
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
>
More information about the general
mailing list