From 04f6e06dd42bac70fc3643141bacf7df6e722f79 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Thu, 24 Sep 2020 14:00:55 +0200 Subject: [PATCH 1/2] gnrc_ipv6_nib: only multicast probe UNREACHABLE neighbor if 6LR Non-routing 6LNs do not have to join the solicited nodes address, so probing for a neighbor using that address may be in vain and only spamming the LLN with unnecessary messages. RFC 6775 basically assumes this in section 5.2: > There is no need to join the solicited-node multicast address, since > nobody multicasts NSs in this type of network. --- sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c b/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c index 3687e394d0..e3848c8c13 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-arsm.c @@ -233,7 +233,19 @@ void _handle_snd_ns(_nib_onl_entry_t *nbr) } /* intentionally falls through */ case GNRC_IPV6_NIB_NC_INFO_NUD_STATE_UNREACHABLE: - _probe_nbr(nbr, false); + if (!IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LR) || + /* if neighbor is a 6LoWPAN node (i.e. address registartion + * state is non-garbage-collectible), only probe if it is a + * router (where the solicited-nodes multicast address MUST + * be set; only MAY otherwise). + * See: + * - https://tools.ietf.org/html/rfc6775#section-5.2 + * - https://tools.ietf.org/html/rfc6775#section-6.5.5 + */ + (_get_ar_state(nbr) == GNRC_IPV6_NIB_NC_INFO_AR_STATE_GC) || + (nbr->info & GNRC_IPV6_NIB_NC_INFO_IS_ROUTER)) { + _probe_nbr(nbr, false); + } break; default: break; From 9631576b22ccb1bd8313153e1eca8ef0a7ed6b1d Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Mon, 28 Sep 2020 14:24:31 +0200 Subject: [PATCH 2/2] gnrc_ipv6_nib: make ARO extra status codes also available without 6LN --- sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.h b/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.h index 489450ba8b..dca4eee612 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.h +++ b/sys/net/gnrc/network_layer/ipv6/nib/_nib-6ln.h @@ -34,7 +34,6 @@ extern "C" { #endif -#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LN) || defined(DOXYGEN) /** * @brief Additional (local) status to ARO status values for tentative * addresses @@ -57,6 +56,7 @@ extern "C" { */ #define _ADDR_REG_STATUS_UNAVAIL (255) +#if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LN) || defined(DOXYGEN) /** * @brief Resolves address statically from destination address using reverse * translation of the IID