<h3>Contribution description</h3>
<p>Following <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/hovercards?user_id=739129" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/cgundogan">@cgundogan</a> comment in <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="408322939" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/10978" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/10978/hovercard?comment_id=202567367&comment_type=review" href="https://github.com/RIOT-OS/RIOT/pull/10978#pullrequestreview-202567367">#10978 (review)</a> I investigated what is broken and the loop has a broken stop condition. This fixes that, I also added a fix for the iteration, that the last element passed in case none can be garbage collected is re-added to the list (otherwise it won't never be garbage collected again).</p>

<h3>Testing procedure</h3>
<p>For testing I ran <a rel="nofollow" href="https://gist.github.com/miri64/fac4df86be36f0a65d9bdb4d2f09d5c7#file-03-4-test-sh">https://gist.github.com/miri64/fac4df86be36f0a65d9bdb4d2f09d5c7#file-03-4-test-sh</a> again, but I adapted [this line] firstly for master and secondly so that the packet buffer doesn't run over that easily: <code>sendline ${TAP} "ping6 -c ${PING_COUNT} ${TAP0_ADDR} -i 100</code>. When running it with this script I get a much fairer distribution of packet loss rates across the pinging nodes (one might get something around 0% which is the default router which is not garbage collectible).</p>

<h3>Issues/PRs references</h3>
<p>Follow-up to <a class="issue-link js-issue-link" data-error-text="Failed to load issue title" data-id="408322939" data-permission-text="Issue title is private" data-url="https://github.com/RIOT-OS/RIOT/issues/10978" data-hovercard-type="pull_request" data-hovercard-url="/RIOT-OS/RIOT/pull/10978/hovercard" href="https://github.com/RIOT-OS/RIOT/pull/10978">#10978</a>.</p>


<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/RIOT-OS/RIOT/pull/10998'>https://github.com/RIOT-OS/RIOT/pull/10998</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>gnrc_ipv6_nib: fix iteration conditions for cache-out</li>
  <li>gnrc_ipv6_nib: add clarification to comment in cache-out</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/RIOT-OS/RIOT/pull/10998/files#diff-0">sys/net/gnrc/network_layer/ipv6/nib/_nib-internal.c</a>
    (9)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/10998.patch'>https://github.com/RIOT-OS/RIOT/pull/10998.patch</a></li>
  <li><a href='https://github.com/RIOT-OS/RIOT/pull/10998.diff'>https://github.com/RIOT-OS/RIOT/pull/10998.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/RIOT-OS/RIOT/pull/10998">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AEn7YKJysUYjeIqtUfbU6XelGGn6zG8pks5vMqMTgaJpZM4a2KyL">mute the thread</a>.<img src="https://github.com/notifications/beacon/AEn7YCAKU4Xlb3DRsovU-k6j_8mz9AfYks5vMqMTgaJpZM4a2KyL.gif" height="1" width="1" alt="" /></p>
<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/RIOT-OS/RIOT","title":"RIOT-OS/RIOT","subtitle":"GitHub repository","main_image_url":"https://github.githubassets.com/images/email/message_cards/header.png","avatar_image_url":"https://github.githubassets.com/images/email/message_cards/avatar.png","action":{"name":"Open in GitHub","url":"https://github.com/RIOT-OS/RIOT"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":" gnrc_ipv6_nib: fix iteration conditions for cache-out (#10998)"}],"action":{"name":"View Pull Request","url":"https://github.com/RIOT-OS/RIOT/pull/10998"}}}</script>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/10998",
"url": "https://github.com/RIOT-OS/RIOT/pull/10998",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>