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

Martine Lenders notifications at github.com
Tue Feb 12 10:49:11 CET 2019

# Backport of #10978

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 (*edit: for master you might need to adapt [this line](https://gist.github.com/miri64/fac4df86be36f0a65d9bdb4d2f09d5c7#file-03-4-test-sh-L62) to `sendline ${TAP} "ping6 -c ${PING_COUNT} ${TAP0_ADDR} -s 1452 -i 0"`*). 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 (using `<Ctrl>+C`).
- 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:


-- 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 --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190212/db5db144/attachment-0001.html>

More information about the notifications mailing list