<p></p>
<p>Ok, so I think the 'real patch' should be</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-md">--- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c</span>
<span class="pl-mi1">+++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c</span>
<span class="pl-mdr">@@ -220,7 +220,7 @@</span> int gnrc_ipv6_nib_get_next_hop_l2addr(const ipv6_addr_t *dst,
         /* consider neighbor cache entries first */
         unsigned iface = (node == NULL) ? 0 : _nib_onl_get_if(node);
 
<span class="pl-md"><span class="pl-md">-</span>        if ((node != NULL) || _on_link(dst, &iface)) {</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>        if (((node != NULL) && (nce->mode & _NC)) || _on_link(dst, &iface)) {</span>
             DEBUG("nib: %s is on-link or in NC, start address resolution\n",
                   ipv6_addr_to_str(addr_str, dst, sizeof(addr_str)));
             /* on-link prefixes return their interface */</pre></div>
<p>Then I was wondering if it even makes sense for <code>_nib_onl_get()</code> to return non-NC entries as all on-link entries should also be in the neighbor cache.</p>
<p>If I'm wrong I can also add a <code>_nib_onl_nc_get()</code> and simplify some of the code that manually checks for the <code>_NC</code> flag now.</p>

<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/16671#issuecomment-884786539">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABE7WYALMNTFW5AFE4W6XDDTY7SQHANCNFSM5AYY7GOA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/ABE7WYBP7QDXGDYTXYIIJD3TY7SQHA5CNFSM5AYY7GOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOGS6MK2Y.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/RIOT-OS/RIOT/pull/16671#issuecomment-884786539",
"url": "https://github.com/RIOT-OS/RIOT/pull/16671#issuecomment-884786539",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>