Patchwork [3.5.y.z,extended,stable] Patch "6lowpan: Fix endianness issue in is_addr_link_local()." has been added to staging queue

login
register
mail settings
Submitter Luis Henriques
Date March 21, 2013, 1:37 p.m.
Message ID <1363873033-20973-1-git-send-email-luis.henriques@canonical.com>
Download mbox | patch
Permalink /patch/229680/
State New
Headers show

Comments

Luis Henriques - March 21, 2013, 1:37 p.m.
This is a note to let you know that I have just added a patch titled

    6lowpan: Fix endianness issue in is_addr_link_local().

to the linux-3.5.y-queue branch of the 3.5.y.z extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.5.y-queue

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.5.y.z tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

From 26e5594467ee468add06a7e472f767cc162caa13 Mon Sep 17 00:00:00 2001
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Date: Sat, 9 Mar 2013 09:11:57 +0000
Subject: [PATCH] 6lowpan: Fix endianness issue in is_addr_link_local().

commit 9026c4927254f5bea695cc3ef2e255280e6a3011 upstream.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
---
 net/ieee802154/6lowpan.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
1.8.1.2

Patch

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,