-
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: Preserve order when replacing 6lowpan header by decoded IPv6 header #5029
gnrc_sixlowpan: Preserve order when replacing 6lowpan header by decoded IPv6 header #5029
Conversation
Did you find out why the UDP checksum is wrong? Wrong decompression or wrong reassembly might be the cause. I would like to have this fixed beforehand. |
I'm guessing reassembly. I noticed that the packet is too small as well... |
Is this with #4935 or without? |
(#4935 does not reassemble the packet in an payload->udp->ipv6->netif manner because it was way easier to just reassemble the IPv6 datagram in one snip and let IPv6 do the disentangling as it does for Ethernet) |
(so the result with #4935 after reassembly should be a packet payload->netif) |
Okay, then I believe the actual cause is not corrected, but this PR solves a crash |
c34a557
to
d770d6a
Compare
rebased. |
@authmillenon ping |
Just am looking into it… but I'm still trying to find a test scenario for this :/ |
Thought for some reason that this involved forwarding... Tested with a simple UDP example and it worked. ACK and go. |
gnrc_sixlowpan: Preserve order when replacing 6lowpan header by decoded IPv6 header
This fixes a very difficult to trace hard fault on a 6lbr when forwarding a reassembled fragmented UDP packet from 6lowpan to ethos (or another larger MTU device).
Without this change, the packet snips were arranged in the following order:
netiif->udp->ipv6
After this change the snips are:
udp->ipv6->netif
This caused a hard fault at gnrc_ipv6.c:826 trying to pktbuf release a NULL pointer.
The cause of the issue was that the 6lo header was the old head of the snip list:
6lo->netif
and in the old code, removing the 6lo header made netif the new head, and the decoded header was appended to the netif snip.
I tested this with #4544 and #4935 applied and IPHC UDP NHC reenabled.
The hard fault is gone but now the UDP checksum on the packet coming out on the ethos pipe is wrong, according to Wireshark.