[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 20:08:14 PST 2007


On Tue, 2007-01-02 at 20:25, Jason Gunthorpe wrote:
> On Tue, Jan 02, 2007 at 07:03:42PM -0500, Hal Rosenstock wrote:
> > -	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 );
> 
> Should be FFC, ie:

Missed that. Thanks.

I'll reiusse the patch.

-- Hal

> #define IN6_IS_ADDR_LINKLOCAL(a) \
>         ((((__const uint32_t *) (a))[0] & htonl (0xffc00000))	\
>          == htonl (0xfe800000))
> 
> Jason





More information about the general mailing list