1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

gnrc_ipv6_nib: make configurable via Kconfig again

This commit is contained in:
Martine Lenders 2022-07-22 16:59:00 +02:00
parent 055d960d5e
commit fe3d620a63
No known key found for this signature in database
GPG Key ID: 2134D77A5336DD80
3 changed files with 22 additions and 5 deletions

View File

@ -134,7 +134,9 @@ extern "C" {
*/
#ifndef CONFIG_GNRC_IPV6_NIB_ADV_ROUTER
#if CONFIG_GNRC_IPV6_NIB_ROUTER && \
(!CONFIG_GNRC_IPV6_NIB_6LR || CONFIG_GNRC_IPV6_NIB_6LBR)
(!CONFIG_GNRC_IPV6_NIB_6LR || CONFIG_GNRC_IPV6_NIB_6LBR) && \
!(IS_USED(MODULE_GNRC_DHCPV6_CLIENT_IA_PD) || IS_USED(MODULE_GNRC_UHCPC) || \
IS_USED(MODULE_GNRC_IPV6_AUTO_SUBNETS))
#define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 1
#else
#define CONFIG_GNRC_IPV6_NIB_ADV_ROUTER 0
@ -149,8 +151,12 @@ extern "C" {
* Requires the `gnrc_ipv6_nib_rio` module.
*/
#ifndef CONFIG_GNRC_IPV6_NIB_ADD_RIO_IN_LAST_RA
#if IS_USED(MODULE_GNRC_IPV6_AUTO_SUBNETS)
#define CONFIG_GNRC_IPV6_NIB_ADD_RIO_IN_LAST_RA 1
#else
#define CONFIG_GNRC_IPV6_NIB_ADD_RIO_IN_LAST_RA 0
#endif
#endif
/**
* @brief (de-)activate NDP address resolution state-machine

View File

@ -65,7 +65,6 @@ endif
ifneq (,$(filter gnrc_dhcpv6_client_simple_pd,$(USEMODULE)))
USEMODULE += gnrc_dhcpv6_client
USEMODULE += dhcpv6_client_ia_pd
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ADV_ROUTER=0
endif
ifneq (,$(filter gnrc_uhcpc,$(USEMODULE)))
@ -73,7 +72,6 @@ ifneq (,$(filter gnrc_uhcpc,$(USEMODULE)))
USEMODULE += uhcpc
USEMODULE += gnrc_sock_udp
USEMODULE += fmt
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ADV_ROUTER=0
endif
ifneq (,$(filter gnrc_%,$(filter-out gnrc_lorawan gnrc_netapi gnrc_netreg gnrc_netif% gnrc_pkt%,$(USEMODULE))))
@ -130,8 +128,6 @@ endif
ifneq (,$(filter gnrc_ipv6_auto_subnets,$(USEMODULE)))
USEMODULE += gnrc_ipv6_nib_rtr_adv_pio_cb
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ADV_ROUTER=0
CFLAGS += -DCONFIG_GNRC_IPV6_NIB_ADD_RIO_IN_LAST_RA=1
USEMODULE += xtimer
ifeq (,$(filter gnrc_ipv6_auto_subnets_simple,$(USEMODULE)))
DEFAULT_MODULE += gnrc_ipv6_auto_subnets_auto_init

View File

@ -57,8 +57,23 @@ config GNRC_IPV6_NIB_DNS
config GNRC_IPV6_NIB_ADV_ROUTER
bool "Activate router advertising at interface start-up"
default n if USEMODULE_GNRC_DHCPV6_CLIENT_IA_PD || USEMODULE_GNRC_UHCPC
default n if USEMODULE_GNRC_IPV6_AUTO_SUBNETS
default y if GNRC_IPV6_NIB_ROUTER && (!GNRC_IPV6_NIB_6LR || GNRC_IPV6_NIB_6LBR)
config GNRC_IPV6_NIB_ADD_RIO_IN_LAST_RA
bool "Include a Route Information Option for subnets"
default y if USEMODULE_GNRC_IPV6_AUTO_SUBNETS
default n
help
on other interfaces in the last Router Advertisement
generated by @ref gnrc_ipv6_nib_change_rtr_adv_iface
if GNRC_IPV6_NIB_ADD_RIO_IN_LAST_RA
comment "Activating inclusion of the Route Information Option"
comment "requires the `gnrc_ipv6_nib_rio` module."
endif
config GNRC_IPV6_NIB_DC
bool "Destination cache"