netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ipv6 addrconf: Fix addrconf_ifid_eui64 of 802.15.4 devices
@ 2013-03-07 20:13 Alexander Aring
  2013-03-07 20:41 ` Alexander Aring
  2013-03-07 22:41 ` Ben Hutchings
  0 siblings, 2 replies; 12+ messages in thread
From: Alexander Aring @ 2013-03-07 20:13 UTC (permalink / raw)
  To: davem
  Cc: kuznet, jmorris, yoshfuji, linux-zigbee-devel, netdev,
	Alexander Aring

The function addrconf_ifid_eui64 will copy eui into dev->dev_addr.
We need first to manipulate eui[0] before we call memcpy afterwards.

Broken since commit:
5e98a36ed4bf6ea396170e3af0dd4fcbe51d772f

Since this commit I got many trouble with the ieee802154 stack.

Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
 net/ipv6/addrconf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index fa36a67..4460237 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -1731,8 +1731,8 @@ static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev)
 {
 	if (dev->addr_len != IEEE802154_ADDR_LEN)
 		return -1;
-	memcpy(eui, dev->dev_addr, 8);
 	eui[0] ^= 2;
+	memcpy(eui, dev->dev_addr, 8);
 	return 0;
 }
 
-- 
1.8.1.5

^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2013-03-09 20:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07 20:13 [PATCH] ipv6 addrconf: Fix addrconf_ifid_eui64 of 802.15.4 devices Alexander Aring
2013-03-07 20:41 ` Alexander Aring
2013-03-08  2:21   ` YOSHIFUJI Hideaki
2013-03-08  9:37     ` Alexander Aring
2013-03-08 17:30       ` YOSHIFUJI Hideaki
2013-03-09  4:34         ` YOSHIFUJI Hideaki
2013-03-09 20:08           ` Alexander Aring
2013-03-07 22:41 ` Ben Hutchings
2013-03-07 22:57   ` Eric Dumazet
2013-03-07 23:17     ` David Miller
2013-03-08  8:53       ` Alexander Aring
     [not found]   ` <1362696088.2936.47.camel-/LGg1Z1CJKReKY3V0RtoKmatzQS1i7+A3tAM5lWOD0I@public.gmane.org>
2013-03-08  9:04     ` Alexander Aring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).