diff --git a/examples/gnrc_border_router/Makefile.native.conf b/examples/gnrc_border_router/Makefile.native.conf index ddf15a214d..89b8528d25 100644 --- a/examples/gnrc_border_router/Makefile.native.conf +++ b/examples/gnrc_border_router/Makefile.native.conf @@ -4,9 +4,11 @@ ZEP_PORT_BASE ?= 17754 ZEP_PORT_MAX := $(shell expr $(ZEP_PORT_BASE) + $(ZEP_DEVICES) - 1) CFLAGS += -DSOCKET_ZEP_MAX=$(ZEP_DEVICES) -CFLAGS += -DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES) CFLAGS += -DASYNC_READ_NUMOF=$(shell expr $(ZEP_DEVICES) + 1) +# Set CFLAGS if not being set via Kconfig +CFLAGS += $(if $(CONFIG_KCONFIG_MODULE_DHCPV6),,-DCONFIG_DHCPV6_CLIENT_PFX_LEASE_MAX=$(ZEP_DEVICES)) + # -z [::1]:$PORT for each ZEP device TERMFLAGS += $(patsubst %,-z [::1]:%, $(shell seq $(ZEP_PORT_BASE) $(ZEP_PORT_MAX))) diff --git a/sys/net/application_layer/Kconfig b/sys/net/application_layer/Kconfig index 39779d9e73..b3d1dda5f7 100644 --- a/sys/net/application_layer/Kconfig +++ b/sys/net/application_layer/Kconfig @@ -13,3 +13,5 @@ rsource "gcoap/Kconfig" rsource "nanocoap/Kconfig" endmenu # CoAP + +rsource "dhcpv6/Kconfig" diff --git a/sys/net/application_layer/dhcpv6/Kconfig b/sys/net/application_layer/dhcpv6/Kconfig new file mode 100644 index 0000000000..5edf2ccd3f --- /dev/null +++ b/sys/net/application_layer/dhcpv6/Kconfig @@ -0,0 +1,19 @@ +# Copyright (c) 2020 Freie Universitaet Berlin +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. +# +menuconfig KCONFIG_MODULE_DHCPV6 + bool "Configure DHCPv6" + depends on MODULE_DHCPV6 + help + Configure DHCPv6 client using Kconfig. + +if KCONFIG_MODULE_DHCPV6 + +config DHCPV6_CLIENT_PFX_LEASE_MAX + int "Maximum number of prefix leases to be stored" + default 1 + +endif # KCONFIG_MODULE_DHCPv6