From patchwork Sat Mar 9 19:11:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [net] 6lowpan: Fix endianness issue in is_addr_link_local(). Date: Sat, 09 Mar 2013 09:11:57 -0000 From: =?utf-8?b?WU9TSElGVUpJIEhpZGVha2kgLyDlkInol6Toi7HmmI4=?= X-Patchwork-Id: 226375 Message-Id: <513B897D.2000207@linux-ipv6.org> To: davem@davemloft.net Cc: linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org, yoshfuji@linux-ipv6.org Signed-off-by: YOSHIFUJI Hideaki --- net/ieee802154/6lowpan.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h index 8c2251f..bba5f83 100644 --- a/net/ieee802154/6lowpan.h +++ b/net/ieee802154/6lowpan.h @@ -84,7 +84,7 @@ (memcmp(addr1, addr2, length >> 3) == 0) /* local link, i.e. FE80::/10 */ -#define is_addr_link_local(a) (((a)->s6_addr16[0]) == 0x80FE) +#define is_addr_link_local(a) (((a)->s6_addr16[0]) == htons(0xFE80)) /* * check whether we can compress the IID to 16 bits,