+ $(LINUX_DIR)/net/key/af_key.$(LINUX_KMOD_SUFFIX) \
+ $(LINUX_DIR)/net/xfrm/xfrm_user.$(LINUX_KMOD_SUFFIX)
+endef
+
+define KernelPackage/ipsec/description
+ Kernel modules for IPsec support in both IPv4 and IPv6.
+ Includes:
+ - af_key
+ - xfrm_user
+endef
+
+$(eval $(call KernelPackage,ipsec))
+
+
+define KernelPackage/ipsec4
+ SUBMENU:=$(NETWORK_SUPPORT_MENU)
+ TITLE:=IPsec related modules (IPv4)
+ DEPENDS:=kmod-ipsec +kmod-iptunnel4 +kmod-crypto-aead
+ KCONFIG:= \
+ CONFIG_INET_AH \
+ CONFIG_INET_ESP \
+ CONFIG_INET_IPCOMP \
+ CONFIG_INET_XFRM_MODE_BEET \
+ CONFIG_INET_XFRM_MODE_TRANSPORT \
+ CONFIG_INET_XFRM_MODE_TUNNEL \
+ CONFIG_INET_XFRM_TUNNEL
+ FILES:= $(foreach mod,ah4 esp4 ipcomp xfrm4_mode_beet xfrm4_mode_transport xfrm4_mode_tunnel xfrm4_tunnel , \
+ $(LINUX_DIR)/net/ipv4/$(mod).$(LINUX_KMOD_SUFFIX) \
+ )
+endef
+
+define KernelPackage/ipsec4/description
+ Kernel modules for IPsec support in IPv4.
+ Includes:
+ - ah4
+ - esp4
+ - ipcomp
+ - xfrm4_mode_beet
+ - xfrm4_mode_transport
+ - xfrm4_mode_tunnel
+ - xfrm4_tunnel
+endef
+
+$(eval $(call KernelPackage,ipsec4))
+
+
+define KernelPackage/ipsec6
+ SUBMENU:=$(NETWORK_SUPPORT_MENU)
+ TITLE:=IPsec related modules (IPv6)
+ DEPENDS:=kmod-ipsec +kmod-iptunnel6 +kmod-crypto-aead
+ KCONFIG:= \
+ CONFIG_INET6_AH \
+ CONFIG_INET6_ESP \
+ CONFIG_INET6_IPCOMP \
+ CONFIG_INET6_XFRM_MODE_BEET \
+ CONFIG_INET6_XFRM_MODE_TRANSPORT \
+ CONFIG_INET6_XFRM_MODE_TUNNEL \
+ CONFIG_INET6_XFRM_TUNNEL
+ FILES:= $(foreach mod,ah6 esp6 ipcomp6 xfrm6_mode_beet xfrm6_mode_transport xfrm6_mode_tunnel xfrm6_tunnel, \
+ $(LINUX_DIR)/net/ipv6/$(mod).$(LINUX_KMOD_SUFFIX) \
+ )
+endef
+
+define KernelPackage/ipsec6/description
+ Kernel modules for IPsec support in IPv6.
+ Includes:
+ - ah6
+ - esp6
+ - ipcomp6
+ - xfrm6_mode_beet
+ - xfrm6_mode_transport
+ - xfrm6_mode_tunnel
+ - xfrm6_tunnel
+endef
+
+$(eval $(call KernelPackage,ipsec6))
+
+
+# NOTE: tunnel4 is not selectable by itself, so enable ipip for that
+define KernelPackage/iptunnel4
+ SUBMENU:=$(NETWORK_SUPPORT_MENU)
+ TITLE:=IPv4 tunneling
+ DEPENDS:= @LINUX_2_6
+ KCONFIG:= \
+ CONFIG_NET_IPIP \
+ CONFIG_INET_TUNNEL
+ FILES:= $(foreach mod,tunnel4, \
+ $(LINUX_DIR)/net/ipv4/$(mod).$(LINUX_KMOD_SUFFIX) \
+ )
+ AUTOLOAD:=$(call AutoLoad,31,tunnel4)
+endef
+
+define KernelPackage/iptunnel4/description
+ Kernel modules for IPv4 tunneling
+endef
+
+$(eval $(call KernelPackage,iptunnel4))
+
+
+define KernelPackage/iptunnel6
+ SUBMENU:=$(NETWORK_SUPPORT_MENU)
+ TITLE:=IPv6 tunneling
+ DEPENDS:= @LINUX_2_6 +kmod-ipv6
+ KCONFIG:= \
+ CONFIG_INET6_TUNNEL
+ FILES:= $(foreach mod,tunnel6, \
+ $(LINUX_DIR)/net/ipv6/$(mod).$(LINUX_KMOD_SUFFIX) \
+ )
+ AUTOLOAD:=$(call AutoLoad,31,tunnel6)
+endef
+
+define KernelPackage/iptunnel6/description
+ Kernel modules for IPv6 tunneling