[riot-notifications] [RIOT-OS/RIOT] gnrc_ipv6_nib: release packet when NC entry can't be added (#10978)

Martine Lenders notifications at github.com
Fri Feb 8 22:03:21 CET 2019


<!--
The RIOT community cares a lot about code quality.
Therefore, before describing what your contribution is about, we would like
you to make sure that your modifications are compliant with the RIOT
coding conventions, see https://github.com/RIOT-OS/RIOT/wiki/Coding-conventions.
-->

### Contribution description
When the neighbor cache is full, the packet trying to resolve a neighbor is not released.

This change fixes that.

<!--
Put here the description of your contribution:
- describe which part(s) of RIOT is (are) involved
- if it's a bug fix, describe the bug that it solves and how it is solved
- you can also give more information to reviewers about how to test your changes
-->


### Testing procedure
Run https://gist.github.com/miri64/fac4df86be36f0a65d9bdb4d2f09d5c7#file-03-4-test-sh in `examples/gnrc_networking` (compiled with `gnrc_pktbuf_cmd`) with `PING_COUNT` set to 10000. You can either wait for the script to finish, but that might take a while or do the following:

- connect to the TMUX session (`tmux a`) after about 10 seconds, and go through all windows (`<Ctrl>+B n` in default config)
- When all the nodes sending pings are either done or all nodes that are not done are reporting `ping timeout` kill the nodes sending pings
- Go to the remaining node that was pinged and type `pktbuf`

With this PR the packet buffer should be empty (there is only one unused section with `next: (nil), size: 6144`), without this PR it is not (there is data dumped as hex to the output).

If you encounter a crash on the pinging node, merge #10975.
<!--
Details steps to test your contribution:
- which test/example to compile for which board and is there a 'test' command
- how to know that it was not working/available in master
- the expected success test output
-->


### Issues/PRs references
Testing procedures might only work for you when you merge #10975. For me that was the case, for @aabadie apparently not.
<!--
Examples: Fixes #1234. See also #5678. Depends on PR #9876.

Please use keywords (e.g., fixes, resolve) with the links to the issues you
resolved, this way they will be automatically closed when your pull request
is merged. See https://help.github.com/articles/closing-issues-using-keywords/.
-->

You can view, comment on, or merge this pull request online at:

  https://github.com/RIOT-OS/RIOT/pull/10978

-- Commit Summary --

  * gnrc_ipv6_nib: release packet when NC entry can't be added

-- File Changes --

    M sys/net/gnrc/network_layer/ipv6/nib/nib.c (1)

-- Patch Links --

https://github.com/RIOT-OS/RIOT/pull/10978.patch
https://github.com/RIOT-OS/RIOT/pull/10978.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/10978
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190208/3548b749/attachment.html>


More information about the notifications mailing list