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_ipv6_nib: fix preparation of delayed NA #10985

Merged
merged 1 commit into from
Feb 12, 2019

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Feb 11, 2019

Contribution description

Currently the constructed NA for a delayed NA case is neither used nor released nor does it get an IPv6 header to be used properly. This fixes that case.

Testing procedure

Since this is currently an edge-case we shouldn't really enter ATM, I fear you have to read and understand the code ... But the test case proposed by @aabadie proposed in RIOT-OS/Release-Specs#98 (comment) might be one to test if together with #10978 this reduces (or even eliminates) the leaks in the packet buffer.

Issues/PRs references

I'm still not sure this fixes all leaks (this code shouldn't even be entered since we do not use anycasts addresses at least in the test case these leaks were found), but definitely closes more leaks together with #10978.

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Feb 11, 2019
@miri64 miri64 added this to the Release 2019.01 milestone Feb 11, 2019
@miri64 miri64 added the Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch label Feb 11, 2019
Currently the constructed NA for a delayed NA case is neither used nor
released nor does it get an IPv6 header to be used properly. This fixes
that case.
@miri64 miri64 force-pushed the gnrc_ipv6_nib/fix/delayed-na branch from 0b3bbdd to aa953a4 Compare February 12, 2019 13:13
@miri64
Copy link
Member Author

miri64 commented Feb 12, 2019

Rebased to current master to ease testing.

@miri64
Copy link
Member Author

miri64 commented Feb 12, 2019

@aabadie do you still have leaks with this PR?

@miri64
Copy link
Member Author

miri64 commented Feb 12, 2019

If yes, please provide a dump of the packet buffer... I can't get any leaks anymore.

@aabadie
Copy link
Contributor

aabadie commented Feb 12, 2019

@miri64, tested several times and no more leaks! Good job!

Codewise I can't tell if the changes are good or not. Maybe @cgundogan can tell ?

Copy link
Member

@cgundogan cgundogan left a comment

Choose a reason for hiding this comment

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

Code-wise ACK. I have a minor question embedded here in the review that I would like to have an answer to, though.

if ((payload = _check_release_pkt(pkt, payload)) == NULL) {
return;
}
((ipv6_hdr_t *)payload->data)->hl = 255;
Copy link
Member

Choose a reason for hiding this comment

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

why 255 and not the configured default for the interface?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because NAs must have their hop-limit set to 255 to ensure they are link-local. NAs with any other hop-limit value are to be ignored silently.

Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe this value could be provided as a define with some documentation ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, but since I use this magic number also in gnrc_ndp_*_send() I'd rather do this in a follow-up, so I don't need to touch these functions in a PR that needs to be backported.

Copy link
Member

Choose a reason for hiding this comment

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

Sure, but since I use this magic number also in gnrc_ndp_*_send() I'd rather do this in a follow-up, so I don't need to touch these functions in a PR that needs to be backported.

👍

@cgundogan cgundogan added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines labels Feb 12, 2019
@cgundogan cgundogan merged commit 3fd13b9 into RIOT-OS:master Feb 12, 2019
@miri64
Copy link
Member Author

miri64 commented Feb 12, 2019

Backport provided in #11009

@miri64 miri64 deleted the gnrc_ipv6_nib/fix/delayed-na branch February 12, 2019 21:37
@miri64
Copy link
Member Author

miri64 commented Feb 12, 2019

I think that concludes at least my part of release critical bugs that needed backporting. Let me know, if you need anything else for RC3.

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 Process: needs backport Integration Process: The PR is required to be backported to a release or feature branch Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines 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.

3 participants