netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: davem@davemloft.net
Cc: kuznet@ms2.inr.ac.ru, jmorris@namei.org, yoshfuji@linux-ipv6.org,
	linux-zigbee-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH] ipv6 addrconf: Fix addrconf_ifid_eui64 of 802.15.4 devices
Date: Thu,  7 Mar 2013 21:13:03 +0100	[thread overview]
Message-ID: <1362687183-3425-1-git-send-email-alex.aring@gmail.com> (raw)

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

             reply	other threads:[~2013-03-07 20:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-07 20:13 Alexander Aring [this message]
2013-03-07 20:41 ` [PATCH] ipv6 addrconf: Fix addrconf_ifid_eui64 of 802.15.4 devices 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362687183-3425-1-git-send-email-alex.aring@gmail.com \
    --to=alex.aring@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-zigbee-devel@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).