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

gnrc/nib: honor CONFIG_GNRC_IPV6_NIB_ADV_ROUTER option

This option was unused before, honor it to make it possible to start
with router advertisements disabled and enable them at run time.

The defaults remain unchanged by that.
This commit is contained in:
Benjamin Valentin 2021-06-17 18:39:25 +02:00 committed by Benjamin Valentin
parent e74ba8f92d
commit f5d5ff3794

View File

@ -46,8 +46,7 @@ static inline void _init_iface_router(gnrc_netif_t *netif)
netif->ipv6.ra_sent = 0;
netif->flags |= GNRC_NETIF_FLAGS_IPV6_FORWARDING;
if (!IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LR) ||
IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_6LBR)) {
if (IS_ACTIVE(CONFIG_GNRC_IPV6_NIB_ADV_ROUTER)) {
netif->flags |= GNRC_NETIF_FLAGS_IPV6_RTR_ADV;
}