Linux IEEE 802.15.4 and 6LoWPAN development
 help / color / mirror / Atom feed
From: Alexander Aring <alex.aring@gmail.com>
To: Phoebe Buckheister <phoebe.buckheister@itwm.fraunhofer.de>
Cc: Lennert Buytenhek <buytenh@wantstofly.org>, linux-wpan@vger.kernel.org
Subject: Re: [PATCH,RFC bluetooth-next 1/2] ieee802154: Fix generation of random EUI-64 addresses.
Date: Thu, 28 May 2015 17:23:19 +0200	[thread overview]
Message-ID: <20150528152315.GA31492@omega> (raw)
In-Reply-To: <20150528171315.0833a387@zoidberg>

Hi,

On Thu, May 28, 2015 at 05:13:15PM +0200, Phoebe Buckheister wrote:
> On Thu, 28 May 2015 15:38:32 +0300
> Lennert Buytenhek <buytenh@wantstofly.org> wrote:
> 
> > Currently, ieee802154_random_extended_addr() has a 50% chance of
> > generating a group (multicast) address, while this function is used
> > for generating station addresses (which can't be group addresses)
> > for interfaces that don't have a hardware-provided address.
> > 
> > Also, in case get_random_bytes() generates the EUI-64 address
> > 00:00:00:00:00:00:00:00 (extremely unlikely), which is an invalid
> > address, ieee802154_random_extended_addr() reacts by changing it
> > to 01:00:00:00:00:00:00:00, which is an invalid station address as
> > well, as it is a group address.
> > 
> > This patch changes the address generation procedure to grab eight
> > random bytes, treat that as an EUI-64, and then clear the Group
> > address bit and set the Locally Administered bit, which is in
> > line with how eth_random_addr() generates random EUI-48s.
> 
> Looks good to me. Even if this ends up being uneccessarily strict, we'll
> always have a huge pool of addresses we may generate.
> Note: the standard only says that the address shall be a 64 bit
> universal address (not excluding multicast), but not generating
> multicast EUIs seems like a good idea anyway.
>  

thanks Phoebe for clarify this. You both convince me to change it.

Thanks that we clarify this.

> > Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org>

Acked-by: Alexander Aring <alex.aring@gmail.com>

  reply	other threads:[~2015-05-28 15:23 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-28 12:38 [PATCH,RFC bluetooth-next 1/2] ieee802154: Fix generation of random EUI-64 addresses Lennert Buytenhek
2015-05-28 13:17 ` Alexander Aring
2015-05-28 13:39   ` Lennert Buytenhek
2015-05-28 14:12     ` Lennert Buytenhek
2015-05-28 14:42     ` Alexander Aring
2015-05-28 14:53       ` Alexander Aring
2015-05-29  3:22         ` Lennert Buytenhek
2015-05-29  3:19       ` Lennert Buytenhek
2015-05-29  8:21         ` Stefan Schmidt
2015-05-29  8:27           ` Lennert Buytenhek
2015-05-28 15:13 ` Phoebe Buckheister
2015-05-28 15:23   ` Alexander Aring [this message]
2015-05-28 16:11 ` Marcel Holtmann

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=20150528152315.GA31492@omega \
    --to=alex.aring@gmail.com \
    --cc=buytenh@wantstofly.org \
    --cc=linux-wpan@vger.kernel.org \
    --cc=phoebe.buckheister@itwm.fraunhofer.de \
    /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