From 2139b51cb5f66ea53d3a24f6d50bae8d72301967 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20H=C3=BC=C3=9Fler?= Date: Wed, 13 Apr 2022 00:19:03 +0200 Subject: [PATCH] gnrc/nib: only enable RTR_ADV on RA if MULTIHOP_P6C is enabled If multihop distribution is not done using RA messages, then the routers follow [RFC4861], which states that they merely do some consistency checks; in this case, nothing in Section 8.1 applies. - https://datatracker.ietf.org/doc/html/rfc6775#section-8.1 --- sys/net/gnrc/network_layer/ipv6/nib/nib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib.c b/sys/net/gnrc/network_layer/ipv6/nib/nib.c index 1985cc7a41..96cb10cf0c 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c @@ -817,7 +817,9 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6, evtimer_del(&_nib_evtimer, &netif->ipv6.search_rtr.event); #if IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LN) if (gnrc_netif_is_6ln(netif) && !gnrc_netif_is_6lbr(netif)) { - _set_rtr_adv(netif); + if (IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_MULTIHOP_P6C)) { + _set_rtr_adv(netif); + } /* but re-fetch information from router in time */ _evtimer_add(netif, GNRC_IPV6_NIB_SEARCH_RTR, &netif->ipv6.search_rtr, (next_timeout >> 2) * 3);