Skip to content
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.c: handle forwarded GNRC_NETTYPE_IPV6 packet #5232

Merged
merged 1 commit into from
Apr 19, 2016

Conversation

jnohlgard
Copy link
Member

adopted #4544
Forwarded packets are not split into multiple snips and the whole payload is left marked (incorrectly?) as GNRC_NETTYPE_IPV6 after decompressing the 6lowpan information. This patch makes the UDP header compression keep any trailing garbage/payload if the snip was not marked as an UDP header.

This fix makes UDP NHC work for my test setup.

@jnohlgard jnohlgard added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking GNRC labels Apr 2, 2016
@jnohlgard jnohlgard added this to the Release 2016.04 milestone Apr 2, 2016
@jnohlgard jnohlgard mentioned this pull request Apr 2, 2016
@jnohlgard
Copy link
Member Author

This is ugly, but it fixes the symptom (forwarded packets have 0 length payload).

The proper fix would probably be to mark the UDP header in the correct location and mark the remaining payload snip as NETTYPE_UNDEF or something.

@PeterKietzmann
Copy link
Member

@ReneHerthel maybe this is of interest for you

@miri64
Copy link
Member

miri64 commented Apr 19, 2016

Tested it rebased to master with an ethos border router (sending UDP packets to and from the host system using netcat) and it worked. ACK and go when travis Murdock is happy. We could take #5044 into release then.

@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 19, 2016
@cgundogan
Copy link
Member

Let go of Travis (:
Am 19.04.2016 12:03 schrieb "Martine Lenders" notifications@github.com:

Tested it rebased to master with an ethos border router (sending UDP
packets to and from the host system using netcat) and it worked. ACK and go
when travis is happy. We could take #5044
#5044 into release then.


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
#5232 (comment)

@miri64
Copy link
Member

miri64 commented Apr 19, 2016

(already corrected it ;-P)

@miri64 miri64 added the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Apr 19, 2016
@OlegHahm OlegHahm merged commit 5d65d59 into RIOT-OS:master Apr 19, 2016
@miri64 miri64 removed the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Apr 19, 2016
@miri64 miri64 mentioned this pull request Apr 19, 2016
if (udp->type == GNRC_NETTYPE_IPV6) {
/* forwarded ipv6 packet */
size_t diff = sizeof(udp_hdr_t) - nhc_len;
for (int i = nhc_len; i < (udp->size - diff); i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently this is the line which is breaking Murdock, but it's strange that Murdock didn't show the error on this check... How can we proceed to this? should I only change the the type of int i to size_t i to make Murdock happy? Is this the real cause of Murdock failing everywhere?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think yes. I tried bisecting, #5044 was the commit that breaks compilation.

Copy link
Contributor

@kYc0o kYc0o Apr 20, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's not really broken but it forces NHC to be included by default, on which Murdock fails as the variables are not of the same type. But for me a size_t i = ... is somehow weird though... But well, it should be fixed somehow.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternatively, you can use unsigned i = ... ;-) The error is about signage.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #5360 .

@jnohlgard jnohlgard deleted the pr/jfischer-nhc-fix branch June 23, 2016 07:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants