1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-28 16:01:18 +01:00

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.
This commit is contained in:
Martine Lenders 2020-09-24 14:00:55 +02:00
parent 4a133a7d30
commit 04f6e06dd4
No known key found for this signature in database
GPG Key ID: CCD317364F63286F

View File

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