-
Notifications
You must be signed in to change notification settings - Fork 2.1k
gnrc_sixlowpan: Fix IPHC/NHC packet order problem #4485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Most likely you cannot send because of #4482. |
I wait in anticipation (can't test for now anyway). |
looks good, will test it during the day. |
https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/network_layer/ipv6/gnrc_ipv6.c#L729
sorry, do not have time to dig deeper, possibly tonight |
As today is release day, I propose disabling NHC for this release. It seems a little to hotfixed to me. What do you guys think? |
What do you mean by disabling it? And be aware that without NHC no UDP connection between RIOT and Linux is possible over 6LoWPAN (at least not unless you know how to disable IPHC on Linux). |
I thought about disabling the pseudomodule by just not making it a dependency of IPHC.
Hm. With the broken NHC no UDP exchange is possible when RIOT translates between IPv6 and 6lowpan. Isn't that the border router use case? No hard feelings here, but IMHO not having NHC is not a show stopper, and once we have a fix, we could backport (and then reenable NHC). What does the RFC say? Isn't NHC optional? Or all of IPHC? (Sending broken packages is definately just wrong.) The best would be to just fix it. @authmillenon? ;) |
RFC6282 says:
I still haven't fully understand which setups are currently broken. May be a bit weird to introduce a new feature to the bug-fixing branch. However, I guess it's our decision what is allowed to go into this branch and we don't have to limit ourselves to bugfixes. |
I still haven't fully understand which setups are currently broken.
I stumbled upon it in this setup:
linux <-> 6lr <-> RIOT, with linux<->6lr connected over ethernet (using
ethos, but that shouldn't matter), and the riot nodes being SAM R21s.
pinging works perfectly, but a CoAP reply from RIOT to Linux is broken.
&lr <-> RIOT is sixlowpan, linux<->6lr is IPv6.
Kaspar
|
planning to test with the below setup as soon as I get libcoap installed on the (slow) pi. Linux (Pi + 802.15.4 module) <=> RIOT (samr21-xpro) |
linux (Linux 4.4.0) <-> riot (master), udp with nhc working fine in both directions ! |
What about #4485 (comment) then? |
About: linux (Linux 4.4.0) <-> riot (00b64b2) |
Ah sorry, did not saw the master. But the headers are still reversed RIOT internally? |
Also for the CoAP example? |
I just tried the same setup as before: linux (copper) <-> 6lbr (RIOT) <-> 6lr (RIOT). I did a CoAP ping from linux to the 6lr and the fix proposed here merged into master. CoAP ping does not work. If I disable |
What about Linux (copper or libcoap) <-> 6lr (RIOT)? |
I have no setup for this ready. @emmanuelsearch were you able to install the coap-client? |
Found cause of #4485 (comment) will fix, but test first |
yes I have finally managed to installe coap-client (libcoap) on our local pi. Stay tuned. |
EDIT: the below works for master, but not with this PR Seems to work for the setup I tried: Linux (Pi + 802.15.4 module) <=> RIOT (samr21-xpro)
|
tested with libcoap: |
So, then the problem is only existent when ahving an 6lbr in between? At least it didn't work for me and from what I understand it also didn't work for @kaspar030 (wit this fix included in master?) |
Found another issue causing #4462 that is unrelated to this fix. |
Rebased to current master. |
Might not be related to this PR, but thanks |
Updated the doc for the |
To which PR is it related then? |
There is none yet, issue #4462 exists for that. |
This PR just fixes the packet order |
Could you squash, please? |
1 similar comment
Could you squash, please? |
Done |
I see two commits with the same commit message |
7232eea
to
21beaa7
Compare
Look again ;-) |
magic.. (: Let's wait for travis now and then merge this |
You forgot to set the label ;-) |
travis agrees - GO |
gnrc_sixlowpan: Fix IPHC/NHC packet order problem
Fixes #4397 (and maybe #4462). Could not test because for some reason I can't send anything right now (even with
txtsnd
).Here is the general idea of this fix: the
ipv6
parameter ofgnrc_sixlowpan_iphc_decode()
is replaced with the out-parameterdec_hdr
. Whilegnrc_sixlowpan_iphc_decode()
handles the dereferenced pointer the same as it used to handleipv6
iphc_nhc_udp_decode()
sets it to the UDP header and appends the IPv6 header (the old value ofdec_hdr
) to the UDP header. This way the correct header order should be preserved.Depends on
#4507(merged).