kernel: add @IPV6 dependency to ipv6 modules

IPv6 modules should all depend on @IPV6, to avoid circular dependencies
problems, especially if they select a module that depends on IPV6 as
well.  In theory, if a package A depends on IPV6, any package doing
'select A' (DEPENDS+= A) should also depend on IPV6; otherwise selecting
A will fail.  Sometimes the build system is forgiving this, but
eventually, and unexpectedly, it may blow up on some other commit.

Alternatively one can conditionally add IPv6 dependencies only if
CONFIG_IPV6 is selected: (DEPENDS+= +IPV6:package6).

Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
This commit is contained in:
Eneas U de Queiroz
2020-04-07 17:07:19 -03:00
committed by Petr Štetiar
parent 4627b5df69
commit 2e6b6f9fca
2 changed files with 11 additions and 8 deletions

View File

@@ -318,7 +318,7 @@ IPSEC6-m += $(ifeq ($$(strip $$(call CompareKernelPatchVer,$$(KERNEL_PATCHVER),l
define KernelPackage/ipsec6
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=IPsec related modules (IPv6)
DEPENDS:=kmod-ipsec +kmod-iptunnel6
DEPENDS:=@IPV6 kmod-ipsec +kmod-iptunnel6
KCONFIG:= \
CONFIG_INET6_AH \
CONFIG_INET6_ESP \
@@ -383,7 +383,7 @@ $(eval $(call KernelPackage,ip-vti))
define KernelPackage/ip6-vti
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=IPv6 VTI (Virtual Tunnel Interface)
DEPENDS:=+kmod-iptunnel +kmod-ip6-tunnel +kmod-ipsec6
DEPENDS:=@IPV6 +kmod-iptunnel +kmod-ip6-tunnel +kmod-ipsec6
KCONFIG:=CONFIG_IPV6_VTI
FILES:=$(LINUX_DIR)/net/ipv6/ip6_vti.ko
AUTOLOAD:=$(call AutoLoad,33,ip6_vti)
@@ -399,7 +399,7 @@ $(eval $(call KernelPackage,ip6-vti))
define KernelPackage/xfrm-interface
SUBMENU:=$(NETWORK_SUPPORT_MENU)
TITLE:=IPsec XFRM Interface
DEPENDS:=+kmod-ipsec4 +kmod-ipsec6 @!LINUX_4_14
DEPENDS:=+kmod-ipsec4 +@IPV6:kmod-ipsec6 @!LINUX_4_14
KCONFIG:=CONFIG_XFRM_INTERFACE
FILES:=$(LINUX_DIR)/net/xfrm/xfrm_interface.ko
AUTOLOAD:=$(call AutoProbe,xfrm_interface)