-
Notifications
You must be signed in to change notification settings - Fork 2k
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
gnrc_sixlowpan_iphc: add support for IPv6 extension header compression #12879
gnrc_sixlowpan_iphc: add support for IPv6 extension header compression #12879
Conversation
Wireshark does not work well with IPHC and IPv6 fragmentation apparently (and I had to handle that corner case in a very hacky way as well): As with UDP NHC the length field is elided (with encapsulated IPv6 headers as well), we have no way within NHC to reconstruct it if it is in a fragmented IPv6 packet (as it is inferred from the IPv6 packet's length minus the preceding extension headers, which is however with IPv6 fragmentation just the length of the first fragment). We only can update the length field after we reassembled the fragmented IPv6 packet so within the IPv6 extension header module, which is what I did. |
22a4045
to
9a27cc8
Compare
Rebased to current master as the merging #12629 caused some conflicts after all :-/ |
Sadly, |
Fixed issues pointed out by Murdock. |
Code looks good. I get this is only for fragmented next headers right? So no change in L2-PDU is to be expected. A node Feel free to squash the fix. |
No for fragment next header. So when the IPv6 packet is fragmented via the fragment header. |
(I'm using this code already relatively successfully on in my experiments for a few days btw) |
d34fecd
to
0300fb4
Compare
Squashed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, no regressions when sending fragmented packets to old RIOT nodes or Linux nodes.
Please clarify what you mean by "fragmented" packets in a 6Lo+IPv6 fragmentation context. Did you send only 6LoWPAN-fragmented packets (packet size <=1280) or also IPv6-fragmented packets (>1280; which in turn are 6LoWPAN-fragmented packets) |
I wasn't even aware I could send packets > 1280 bytes. I only tried 6LoWPAN fragmented packets. |
You helped make it possible (#11623, #11596) ;-). This PR adds compression for the IPv6 extension headers (including the fragment header), so using IPv6 fragmentation for testing is important, as lined out in the testing procedures for this PR. |
However, since I use this for days now in my setup
I think we can merge anyway, what do you think @benpicco? |
Contribution description
Up until now there was still a part of RFC 6282 missing: IPv6 extension header compression. This PR completes IPHC according to RFC 6282 by adding both compression and decompression for extension headers and encapsulated IPv6 headers (which is part of IPv6 extension header compression in RFC 6282).
Testing procedure
Up until now i only confirmed that the current functionality is not regressed by using
tests/gnrc_udp
on twoiotlab-m3
s and sending:Additionally I tested the use case that caused me implementing this: sending IPv6 fragmented packets compressed:
And confirmed with Wireshark, that the packets are sensible (as far as I can judge).
I plan to provide a dedicated test application utilizing(no NHC support forsocket_zep
andscapy
to have more coverage, but that I will do if I find the time for that (this is why this PR is still WIP).scapy
yet)Issues/PRs references
None technically, however I cherry-picked be7b6d3 out of #12629 to avoid conflicts between this PR and the clean-ups in #12629.