lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 14 Aug 2013 13:08:21 +0200
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	Alexander Aring <alex.aring@...il.com>
Cc:	alex.bluesman.smirnov@...il.com, dbaryshkov@...il.com,
	davem@...emloft.net, linux-zigbee-devel@...ts.sourceforge.net,
	netdev@...r.kernel.org
Subject: Re: [PATCHv2 net-next] 6lowpan: handle only real link-local addresses

On Wed, Aug 14, 2013 at 01:01:07PM +0200, Alexander Aring wrote:
> diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h
> index 4b8f917..61f0ce9 100644
> --- a/net/ieee802154/6lowpan.h
> +++ b/net/ieee802154/6lowpan.h
> @@ -83,8 +83,11 @@
>  #define ipaddr_prefixcmp(addr1, addr2, length) \
>  	(memcmp(addr1, addr2, length >> 3) == 0)
>  
> -/* local link, i.e. FE80::/10 */
> -#define is_addr_link_local(a) (((a)->s6_addr16[0]) == htons(0xFE80))
> +/* link-local, i.e. FE80::/64 */
> +#define is_addr_link_local(a) (((a)->s6_addr16[0]) == htons(0xFE80) &&	\
> +		(((a)->s6_addr16[1]) == 0) &&	\
> +		(((a)->s6_addr16[2]) == 0) &&	\
> +		(((a)->s6_addr16[3]) == 0))
>  

Can't you use ipv6_addr_type(a)&IPV6_ADDR_LINKLOCAL?

Greetings,

  Hannes

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ