]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
6lowpan: Fix endianness issue in is_addr_link_local().
authorYOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Sat, 9 Mar 2013 09:11:57 +0000 (09:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Mar 2013 20:05:02 +0000 (13:05 -0700)
[ Upstream commit 9026c4927254f5bea695cc3ef2e255280e6a3011 ]

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ieee802154/6lowpan.h

index aeff3f3104821ab3bdead00ed070d5d3fbb5164d..60b5ef5f64d922473a2d36180e1b9b96a15b160f 100644 (file)
@@ -87,7 +87,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,