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_udp: add missing duplitation step #5749

Merged
merged 1 commit into from
Aug 30, 2016

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Aug 15, 2016

At the moment UDP is duplicating the UDP header wrong, in case pkt->users > 1.

Current behavior:

orig dup
==== ====
IPv6 IPv6
  | /
 UDP UDP
  | /
payload

With this fix:

orig dup
==== ====
IPv6 IPv6
  |    |
 UDP UDP
  | /
payload

The previous behavior leads to the original UDP header to be removed from the packet buffer too early (and subsequently resulting in a crash), because its users counter is one less than expected, while the dangling UDP header never gets removed.

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) GNRC labels Aug 15, 2016
@miri64 miri64 added the Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties label Aug 30, 2016
@smlng
Copy link
Member

smlng commented Aug 30, 2016

Looks fine to me, ACK from my side. @kYc0o any objections?

@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 Aug 30, 2016
@miri64 miri64 merged commit 9ba68cc into RIOT-OS:master Aug 30, 2016
@miri64 miri64 deleted the gnrc_udp/fix/missing-duplication branch August 30, 2016 20:35
@kYc0o
Copy link
Contributor

kYc0o commented Aug 30, 2016

Everything was Ok. Sorry for the delay.

@OlegHahm
Copy link
Member

Nice catch!

@OlegHahm OlegHahm added this to the Release 2016.10 milestone Aug 31, 2016
@miri64 miri64 added Platform: MSP Platform: This PR/issue effects MSP-based platforms Area: network Area: Networking labels Sep 30, 2018
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 Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Platform: MSP Platform: This PR/issue effects MSP-based platforms 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.

4 participants