[riot-notifications] [RIOT-OS/RIOT] gnrc/nib: only consider neighbor cache entries in _nib_onl_get() (#16671)

Martine Lenders notifications at github.com
Thu Jul 22 11:10:20 CEST 2021


@miri64 requested changes on this pull request.

TBH it looks to me like you want to remove the neighbor cache altogether with this PR and I don't really understand how this makes sense. Even with your explanation.

> @@ -102,7 +102,7 @@ void _handle_sl2ao(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6,
         return;
     }
 #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ARSM)
-    if ((nce != NULL) && (nce->mode & _NC) &&

So the NCE you consider here is not an NCE? I'm confused...

> -        if ((node->mode != _EMPTY) &&
+        if ((node->mode != _NC) &&

Huh? The lines below check if the entry is a duplicate. Why only consider non-NCEs here instead of non-empty ones?

> @@ -221,8 +221,9 @@ int gnrc_ipv6_nib_get_next_hop_l2addr(const ipv6_addr_t *dst,
         unsigned iface = (node == NULL) ? 0 : _nib_onl_get_if(node);
 
         if ((node != NULL) || _on_link(dst, &iface)) {
-            DEBUG("nib: %s is on-link or in NC, start address resolution\n",
-                  ipv6_addr_to_str(addr_str, dst, sizeof(addr_str)));
+            DEBUG("nib: %s is %s, start address resolution\n",
+                  ipv6_addr_to_str(addr_str, dst, sizeof(addr_str)),
+                  node ? "in NC" : "on-link");

If an entry is in the NC it is by definition on-link. Not sure why the distinction is made in this debug message...

-- 
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/16671#pullrequestreview-712517311
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20210722/910a29ea/attachment.htm>


More information about the notifications mailing list