From: Alexander Aring <alex.aring@gmail.com>
To: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Cc: Simon Vincent <simon.vincent@xsilon.com>,
linux-wpan@vger.kernel.org, marcel@holtmann.org
Subject: Re: [PATCH linux-wpan v4] ieee802154: 6lowpan: ensure header compression does not corrupt ipv6 header
Date: Tue, 23 Sep 2014 11:26:55 +0200 [thread overview]
Message-ID: <20140923092653.GA12857@omega> (raw)
In-Reply-To: <1411463634.4860.65.camel@jrissane-mobl.ger.corp.intel.com>
On Tue, Sep 23, 2014 at 12:13:54PM +0300, Jukka Rissanen wrote:
> Hi Alex,
>
> On ma, 2014-09-22 at 18:21 +0200, Alexander Aring wrote:
>
> > grml, I overlooked something the last version. But I will fix it while
> > >
> > > - cb->ackreq = !lowpan_is_addr_broadcast(daddr);
> > > + /* TODO: Currently we only support extended_addr */
> > > + info->daddr.mode = IEEE802154_ADDR_LONG;
> >
> > now IEEE802154_ADDR_LONG is no little endian value copied from mac
> > header. Somewhere else converted the little endian value to an host understandable
> > enum/define number. For the rework I will remove this value. We should never
> > ever convert this value for parsing.
> >
> > We use it only for af_802154 and userspace specification what addresses
> > should be used. But the above one to make this __le16 is incorrect. For
> > userspace we should create some enums for declaring different address
> > types. Then we can use this for 802.15.4 sockets.
>
> BTW, at some point we might want to change the IEEE802154_ADDR_LONG in
> net/6lowpan/iphc.c to more generic. Now this IEEE 802154 specific enum
> needs to be mentioned in net/bluetooth/6lowpan.c which looks quite
> confusing.
>
Yep, the generic name for such address is EUI-64. Forget the hyphen
there. There is alot of 802.15.4 specific 6lowpan defines in iphc.c.
They are defined in include/net/6lowpan.h, which should moved into an
internal header of "net/ieee802154/...".
And also we could do this maybe not as address type, more a address
length. EUI64 is 8 and the SHORT address is 2 bytes long. No special
handling about some address types, only handling about different lengt,
only handling about different lengths.
so we have some:
switch (address_length) {
case IEEE_EUI64_ADDRLEN:
case IEEE802154_SHORT_ADDRLEN:
default:
/* not supported */
}
the second case is only for IEEE802154 handling, maybe we could also
check the netdev type, but that's not necessary. bluetooth should never
set IEEE802154_SHORT_ADDRLEN by calling lowpan_header_create.
Also we don't support the case IEEE802154_SHORT_ADDRLEN right now. :-)
That's currently dead code, it's a complicated issue to support that...
but in near future we will support it, otherwise our stack is in an
unusable state.
I mean IEEE_EUI64_ADDRLEN, is in 802154 the extended address. In
bluetooth you need to generate the EUI64 with filling ff:fe pattern.
Like behaviour in ethernet. And drop the special type handling.
Is this okay?
- Alex
next prev parent reply other threads:[~2014-09-23 9:27 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-22 15:52 [PATCH linux-wpan v4] ieee802154: 6lowpan: ensure header compression does not corrupt ipv6 header Simon Vincent
2014-09-22 16:21 ` Alexander Aring
2014-09-22 17:02 ` Alexander Aring
2014-09-23 9:13 ` Jukka Rissanen
2014-09-23 9:26 ` Alexander Aring [this message]
2014-09-23 9:35 ` Alexander Aring
2014-09-23 10:14 ` Jukka Rissanen
2014-09-23 10:33 ` Alexander Aring
2014-09-23 10:45 ` Jukka Rissanen
2014-09-23 15:23 ` Marcel Holtmann
2014-09-23 15:36 ` Alexander Aring
2014-09-23 16:19 ` Marcel Holtmann
2014-09-24 9:47 ` Alexander Aring
2014-09-24 9:55 ` Marcel Holtmann
2014-09-24 10:04 ` Alexander Aring
2014-09-24 12:24 ` Marcel Holtmann
2014-09-24 12:49 ` Alexander Aring
2014-09-23 14:20 ` Jukka Rissanen
2014-09-23 14:43 ` Alexander Aring
2014-09-23 15:03 ` Alexander Aring
2014-09-24 7:10 ` Jukka Rissanen
2014-09-24 7:11 ` Alexander Aring
2014-09-23 10:16 ` Jukka Rissanen
2014-09-22 17:20 ` Alexander Aring
2014-09-24 9:50 ` 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=20140923092653.GA12857@omega \
--to=alex.aring@gmail.com \
--cc=jukka.rissanen@linux.intel.com \
--cc=linux-wpan@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=simon.vincent@xsilon.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.