From 3a8695bd0c0c05ddf8e9d384f9ff6db3888e66b7 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Thu, 15 Feb 2018 14:29:46 +0100 Subject: [PATCH] gnrc_ipv6_nib: only discard RAs without ABROs on 6LR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [RFC6775] only talks of *routers* processing router advertisements, with regards of discarding them if they do not contain an ABRO. Additionally, this change makes configuration of tests setups a lot easier, where one note is a router distributing a prefix and the other is a host to be configured with the RA. Just do the following on the router: ``` > ifconfig add > ifconfig rtr_adv ``` e voilĂ ! In current master both nodes would have needed to be compiled with `GNRC_IPV6_NIB_CONF_MULTIHOP_P6C=0`. [RFC6775]: https://tools.ietf.org/html/rfc6775#section-8.1.3 --- sys/net/gnrc/network_layer/ipv6/nib/nib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/gnrc/network_layer/ipv6/nib/nib.c b/sys/net/gnrc/network_layer/ipv6/nib/nib.c index 74f2b78e5e..0fbdb6b90a 100644 --- a/sys/net/gnrc/network_layer/ipv6/nib/nib.c +++ b/sys/net/gnrc/network_layer/ipv6/nib/nib.c @@ -594,8 +594,8 @@ static void _handle_rtr_adv(gnrc_netif_t *netif, const ipv6_hdr_t *ipv6, MS_PER_SEC); } #if !GNRC_IPV6_NIB_CONF_6LBR - else { - DEBUG("nib: multihop prefix and context dissemination activated,\n" + else if (gnrc_netif_is_6lr(netif)) { + DEBUG("nib: multihop prefix and context dissemination on router activated,\n" " but no ABRO found. Discarding router advertisement silently\n"); return; }