From: Alexander Aring <alex.aring@gmail.com>
To: Martin Townsend <martin.townsend@xsilon.com>
Cc: Martin Townsend <mtownsend1973@gmail.com>,
linux-zigbee-devel@lists.sourceforge.net,
linux-bluetooth@vger.kernel.org, linux-wpan@vger.kernel.org,
marcel@holtmann.org
Subject: Re: [PATCH][linux-bluetooth 3/3] 6lowpan: Refactored lowpan_rcv so it's RFC compliant
Date: Thu, 11 Sep 2014 13:00:21 +0200 [thread overview]
Message-ID: <20140911110020.GF20686@omega> (raw)
In-Reply-To: <20140911105505.GE20686@omega>
Hi Martin,
On Thu, Sep 11, 2014 at 12:55:05PM +0200, Alexander Aring wrote:
> On Thu, Sep 11, 2014 at 11:45:58AM +0100, Martin Townsend wrote:
> > Hi Alex,
> >
> > On 11/09/14 11:33, Alexander Aring wrote:
> > > On Thu, Sep 11, 2014 at 11:09:26AM +0100, Martin Townsend wrote:
> > >> Hi Alex,
> > >>
> > >> Reposting to everyone this time :)
> > >>
> > > ok
> > > ...
> > >>>>> I know this issue and we should not do that in this way.
> > >>>>>
> > >>>>> Why?
> > >>>>>
> > >>>>> Because this works only for fragmentation with IPHC, for example if we
> > >>>>> support mesh or Broadcast or HC1 compression. We should call after
> > >>>>> successfully reassembled "means lowpan_frag_rcv returns 1" the lowpan_rcv again.
> > >>>>> So this is a recursion and we don't should use recursion to much, but it
> > >>>>> should only be one recursion, so I think that's okay. :-)
> > >>>> The spec says that the headers of the 6LoWPAN frame must fit in the first fragment. You need to process these headers to get to the fragmentation header, this is why the code is this way.
> > >>> yes this is for IPHC dispatch values your code works, I don't want to
> > >>> say that it doesn't work. Because fragmentation is something to
> > >>> reconstruct the full payload, we should first evaluate the fragmentation
> > >>> dispatches and then all others. To be sure that we can use fragmentation
> > >>> on any dispatch value which is not the fragmentation dispatch values.
> > >>> :-)
> > >>>
> > >>> Simple move it before nalp check. Maybe somebody fragment something and
> > >>> the dispatch value after fragmentation is nalp. I know it should catch
> > >>> the default branch above, but it's a little bit cleaner. I hope you are
> > >>> in the same opinion.
> > >> I think it should stay where it is.
> > >> From RFC 4944
> > >> NALP: Specifies that the following bits are not a part of the LoWPAN
> > >> encapsulation, and any LoWPAN node that encounters a dispatch
> > >> value of 00xxxxxx shall discard the packet. Other non-LoWPAN
> > >> protocols that wish to coexist with LoWPAN nodes should include a
> > >> byte matching this pattern immediately following the 802.15.4.
> > >> header.
> > >>
> > >> The last sentence implies that this NALP code is expected as the first byte following the MAC Header. If a NALP is encountered after processing the 6LoWPAN header stack then it will be treated as an unknown compression type.
> > >>
> > > yes. But the issue is more a reassembled fragmentet 6LoWPAN packet have
> > > a dispatch value. This dispatch value should not NALP, but maybe
> > > somebody did it and then we should make the same code like what we do
> > > for NALP dispatches without fragmentation.
> > A NALP dispatch byte should be the first byte in the MAC payload that allows other protocols to co-exist with 6LoWPAN. I think Jennet use this to insert their own protocol between 802.15.4 and 6LoWPAN. So we have to check for this before we do anything. Having a NALP byte after re-assembly isn't valid and should be treated as an unknown compression type in my opinion.
> >
>
> Okay, I agree with you with the NALP dispatch. What's about the others.
>
ok. This is out of interest because we don't support all others than
IPV6 and IPHC. The important thing is, if we don't know the dispatch
after fragmentation -> drop it.
We will think about that issue, if somebody implements that.
- Alex
prev parent reply other threads:[~2014-09-11 11:00 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 14:06 [PATCH][linux-bluetooth 0/3] Fix lowpan_rcv Martin Townsend
2014-09-10 14:06 ` Martin Townsend
2014-09-10 14:06 ` [PATCH][linux-bluetooth 1/3] 6lowpan: skb freed locally from lowpan_rcv Martin Townsend
2014-09-11 7:58 ` Alexander Aring
2014-09-11 8:07 ` Alexander Aring
2014-09-11 8:32 ` Martin Townsend
2014-09-10 14:06 ` [PATCH][linux-bluetooth 2/3] 6lowpan: Move skb delivery from IPHC Martin Townsend
2014-09-11 8:18 ` Alexander Aring
2014-09-11 8:25 ` Martin Townsend
2014-09-11 9:01 ` Alexander Aring
2014-09-11 9:33 ` Martin Townsend
2014-09-11 9:53 ` Alexander Aring
2014-09-11 10:12 ` Martin Townsend
2014-09-11 10:25 ` Alexander Aring
2014-09-12 9:18 ` Jukka Rissanen
2014-09-11 14:11 ` Marcel Holtmann
2014-09-10 14:06 ` [PATCH][linux-bluetooth 3/3] 6lowpan: Refactored lowpan_rcv so it's RFC compliant Martin Townsend
2014-09-11 8:53 ` Alexander Aring
2014-09-11 9:09 ` Alexander Aring
2014-09-11 9:21 ` Alexander Aring
2014-09-11 9:30 ` Martin Townsend
2014-09-11 9:50 ` Alexander Aring
2014-09-11 10:09 ` Martin Townsend
2014-09-11 10:33 ` Alexander Aring
2014-09-11 10:45 ` Martin Townsend
2014-09-11 10:55 ` Alexander Aring
2014-09-11 11:00 ` Alexander Aring [this message]
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=20140911110020.GF20686@omega \
--to=alex.aring@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=marcel@holtmann.org \
--cc=martin.townsend@xsilon.com \
--cc=mtownsend1973@gmail.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 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).